29 lines
728 B
Text
29 lines
728 B
Text
Before:
|
||
Save g:ale_dhall_executable
|
||
Save g:ale_dhall_options
|
||
|
||
" Use an invalid global executable, so we don’t match it.
|
||
let g:ale_dhall_executable = 'odd-dhall'
|
||
let g:ale_dhall_options = '--ascii'
|
||
let g:ale_dhall_freeze_options = '--all'
|
||
|
||
call ale#test#SetDirectory('/testplugin/test/dhall')
|
||
|
||
After:
|
||
Restore
|
||
|
||
call ale#test#RestoreDirectory()
|
||
|
||
Execute(The dhall-freeze callback should return the correct options):
|
||
call ale#test#SetFilename('../dhall_files/testfile.dhall')
|
||
|
||
AssertEqual
|
||
\ {
|
||
\ 'command': ale#Escape('odd-dhall')
|
||
\ . ' --ascii'
|
||
\ . ' freeze'
|
||
\ . ' --all'
|
||
\ . ' --inplace %t',
|
||
\ 'read_temporary_file': 1,
|
||
\ },
|
||
\ ale#fixers#dhall_freeze#Freeze(bufnr(''))
|