diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/command_callback/html_beautify_paths/html-beautify | 0 | ||||
-rw-r--r-- | test/command_callback/html_beautify_paths/test.html | 0 | ||||
-rw-r--r-- | test/fixers/test_html_beautify_fixer_callback.vader | 31 |
3 files changed, 31 insertions, 0 deletions
diff --git a/test/command_callback/html_beautify_paths/html-beautify b/test/command_callback/html_beautify_paths/html-beautify new file mode 100755 index 00000000..e69de29b --- /dev/null +++ b/test/command_callback/html_beautify_paths/html-beautify diff --git a/test/command_callback/html_beautify_paths/test.html b/test/command_callback/html_beautify_paths/test.html new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/command_callback/html_beautify_paths/test.html 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('')) |