blob: dacd1cb26e9267069c671413ddd113c6a2215821 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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(''))
|