2018-03-14 17:46:57 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('awk', 'gawk')
|
2018-03-14 17:46:57 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2018-03-14 17:46:57 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
Execute(The default command should be correct):
|
|
|
|
AssertLinter 'gawk',
|
2018-08-03 00:00:39 +00:00
|
|
|
\ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
|
2022-03-20 13:52:22 +00:00
|
|
|
\ . ' --lint -f %t /dev/null'
|
2018-03-14 17:46:57 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
Execute(The executable should be configurable):
|
2018-03-14 17:46:57 +00:00
|
|
|
let b:ale_awk_gawk_executable = '/other/gawk'
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter '/other/gawk',
|
2018-08-03 00:00:39 +00:00
|
|
|
\ ale#Escape('/other/gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
|
2022-03-20 13:52:22 +00:00
|
|
|
\ . ' --lint -f %t /dev/null'
|
2018-03-14 17:46:57 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
Execute(The options should be configurable):
|
2018-03-14 17:46:57 +00:00
|
|
|
let b:ale_awk_gawk_executable = 'gawk'
|
2022-03-20 13:52:22 +00:00
|
|
|
let b:ale_awk_gawk_options = '--lint=no-ext'
|
2018-03-14 17:46:57 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'gawk',
|
2018-08-03 00:00:39 +00:00
|
|
|
\ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
|
2022-03-20 13:52:22 +00:00
|
|
|
\ . ' --lint --lint=no-ext -f %t /dev/null'
|