Files
ale/test/fixers/test_dhall_format_fixer_callback.vader
toastal 167e2e7750 tests
2020-08-14 00:31:49 +07:00

28 lines
663 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Before:
Save g:ale_dhall_executable
Save g:ale_dhall_options
" Use an invalid global executable, so we dont match it.
let g:ale_dhall_executable = 'odd-dhall'
let g:ale_dhall_options = '--ascii'
call ale#test#SetDirectory('/testplugin/test/dhall')
After:
Restore
call ale#test#RestoreDirectory()
Execute(The dhall-format callback should return the correct options):
call ale#test#SetFilename('../dhall_files/testfile.dhall')
AssertEqual
\ {
\ 'command': ale#Escape('odd-dhall')
\ . ' --ascii'
\ . ' format'
\ . ' --inplace %t',
\ 'read_temporary_file': 1,
\ },
\ ale#fixers#dhall_format#Fix(bufnr(''))