summaryrefslogtreecommitdiff
path: root/test/linter/test_gawk.vader
blob: f43642916207b3ae7f3f0ca0c0aee001e97f113f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 }')
  \   . ' --lint -f %t /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 }')
  \   . ' --lint -f %t /dev/null'

Execute(The options should be configurable):
  let b:ale_awk_gawk_executable = 'gawk'
  let b:ale_awk_gawk_options = '--lint=no-ext'

  AssertLinter 'gawk',
  \ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
  \   . ' --lint --lint=no-ext -f %t /dev/null'