This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/fixers/test_tidy_fixer_callback.vader
Abin Simon 17c1aefb5b Add fixer tidy for HTML
Add tests for tidy HTML fixer
2018-06-23 22:59:13 +05:30

29 lines
691 B
Text

Before:
Save g:ale_html_tidy_executable
let g:ale_html_tidy_executable = 'tidy_paths/tidy'
call ale#test#SetDirectory('/testplugin/test/fixers')
silent cd ..
silent cd command_callback
let g:dir = getcwd()
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('tidy_paths/tidy')
\ . ' -q --tidy-mark no --show-errors 0 --show-warnings 0'
\ },
\ ale#fixers#tidy#Fix(bufnr(''))