diff options
author | Hugo Osvaldo Barrera <hugo@barrera.io> | 2019-10-28 14:25:36 +0100 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2019-10-28 13:25:36 +0000 |
commit | 47eb3dd0c0bde414e76a36f270f9c59ce257559b (patch) | |
tree | a6e94d88c0968eee5f2627fe199a48a0c0a09b70 /test/fixers | |
parent | af8c8516d1d9ce75df40fa457debaedcb11a7592 (diff) | |
download | ale-47eb3dd0c0bde414e76a36f270f9c59ce257559b.zip |
Add support for html-beautify (#2788)
* Add support for html-beautify
* Add html-beautify to the list of supported tools
* Update docs
Diffstat (limited to 'test/fixers')
-rw-r--r-- | test/fixers/test_html_beautify_fixer_callback.vader | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/fixers/test_html_beautify_fixer_callback.vader b/test/fixers/test_html_beautify_fixer_callback.vader new file mode 100644 index 00000000..dacd1cb2 --- /dev/null +++ b/test/fixers/test_html_beautify_fixer_callback.vader @@ -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('')) |