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