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/command_callback/test_gawk_command_callback.vader
2018-08-03 01:00:39 +01:00

25 lines
833 B
Text

Before:
call ale#assert#SetUpLinterTest('awk', 'gawk')
After:
call ale#assert#TearDownLinterTest()
Execute(The default command should be correct):
AssertLinter 'gawk',
\ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
\ . ' -f %t --lint /dev/null'
Execute(The executable should be configurable):
let b:ale_awk_gawk_executable = '/other/gawk'
AssertLinter '/other/gawk',
\ ale#Escape('/other/gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
\ . ' -f %t --lint /dev/null'
Execute(The options should be configurable):
let b:ale_awk_gawk_executable = 'gawk'
let b:ale_awk_gawk_options = '--something'
AssertLinter 'gawk',
\ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
\ . ' --something -f %t --lint /dev/null'