X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/fixers/test_tidy_fixer_callback.vader diff --git a/.vim/bundle/ale/test/fixers/test_tidy_fixer_callback.vader b/.vim/bundle/ale/test/fixers/test_tidy_fixer_callback.vader new file mode 100644 index 00000000..25d3d6c3 --- /dev/null +++ b/.vim/bundle/ale/test/fixers/test_tidy_fixer_callback.vader @@ -0,0 +1,25 @@ +Before: + Save g:ale_html_tidy_executable + + let g:ale_html_tidy_executable = '../test-files/tidy/tidy' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The tidy callback should return 0 if tidy not found): + let g:ale_html_tidy_executable = 'xxxinvalidpath' + AssertEqual + \ 0, + \ ale#fixers#tidy#Fix(bufnr('')) + +Execute(The tidy callback should return the correct default command): + AssertEqual + \ { + \ 'command': ale#Escape('../test-files/tidy/tidy') + \ . ' -q --tidy-mark no --show-errors 0 --show-warnings 0' + \ }, + \ ale#fixers#tidy#Fix(bufnr(''))