mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-09 04:52:29 +08:00
Fix the test issues with html-beautify
This commit is contained in:
@@ -1,31 +1,16 @@
|
||||
Before:
|
||||
Save g:ale_html_beautify_executable
|
||||
Save g:ale_html_beautify_options
|
||||
|
||||
let g:ale_html_beautify_options = ''
|
||||
call ale#assert#SetUpFixerTest('html', 'html-beautify', 'beautify')
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
silent cd ..
|
||||
silent cd command_callback
|
||||
let g:dir = getcwd()
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
unlet! b:bin_dir
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The html-beautify callback should return 0 if html-beautify not found):
|
||||
let g:ale_html_beautify_executable = 'xxxinvalidpath'
|
||||
AssertEqual
|
||||
\ 0,
|
||||
\ ale#fixers#html_beautify#Fix(bufnr(''))
|
||||
call ale#assert#TearDownFixerTest()
|
||||
|
||||
Execute(The html-beautify callback should return the correct default command):
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('html_beautify_paths/html-beautify')
|
||||
\ . ' -'
|
||||
\ },
|
||||
\ {'command': '''html-beautify'' -'},
|
||||
\ ale#fixers#html_beautify#Fix(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user