mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-31 08:34:30 +08:00
Add support for html-beautify (#2788)
* Add support for html-beautify * Add html-beautify to the list of supported tools * Update docs
This commit is contained in:
committed by
w0rp
parent
af8c8516d1
commit
47eb3dd0c0
0
test/command_callback/html_beautify_paths/html-beautify
Executable file
0
test/command_callback/html_beautify_paths/html-beautify
Executable file
0
test/command_callback/html_beautify_paths/test.html
Normal file
0
test/command_callback/html_beautify_paths/test.html
Normal file
31
test/fixers/test_html_beautify_fixer_callback.vader
Normal file
31
test/fixers/test_html_beautify_fixer_callback.vader
Normal file
@@ -0,0 +1,31 @@
|
||||
Before:
|
||||
Save g:ale_html_beautify_executable
|
||||
Save g:ale_html_beautify_options
|
||||
|
||||
let g:ale_html_beautify_options = ''
|
||||
|
||||
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(''))
|
||||
|
||||
Execute(The html-beautify callback should return the correct default command):
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('html_beautify_paths/html-beautify')
|
||||
\ . ' -'
|
||||
\ },
|
||||
\ ale#fixers#html_beautify#Fix(bufnr(''))
|
||||
Reference in New Issue
Block a user