summaryrefslogtreecommitdiff
path: root/test/command_callback/test_erlang_syntaxerl_command_callback.vader
blob: 28cff9b98806b7dc2723cea4325915b6ded6323e (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Before:
  call ale#assert#SetUpLinterTest('erlang', 'syntaxerl')

After:
  call ale#assert#TearDownLinterTest()

Execute (The default commands should be correct):
  AssertLinter 'syntaxerl', [
  \ ale#Escape('syntaxerl') . ' -h',
  \ ale#Escape('syntaxerl') . ' %t',
  \]

Execute (The executable should be configurable):
  let b:ale_erlang_syntaxerl_executable = 'foobar'

  AssertLinter 'foobar', [
  \ ale#Escape('foobar') . ' -h',
  \ ale#Escape('foobar') . ' %t',
  \]

Execute (The -b option should be used when available):
  WithChainResults [
  \ 'Syntax checker for Erlang (0.14.0)',
  \ 'Usage: syntaxerl [-d | --debug] <FILENAME>',
  \ '       syntaxerl <-h | --help>',
  \ '  -d, --debug    Enable debug output',
  \ '  -h, --help     Show this message',
  \]
  AssertLinter 'syntaxerl', [
  \ ale#Escape('syntaxerl') . ' -h',
  \ ale#Escape('syntaxerl') . ' %t',
  \]

  WithChainResults [
  \ 'Syntax checker for Erlang (0.14.0)',
  \ 'Usage: syntaxerl [-b | --base <FILENAME>] [-d | --debug] <FILENAME>',
  \ '       syntaxerl <-h | --help>',
  \ '  -b, --base     Set original filename',
  \ '  -d, --debug    Enable debug output',
  \ '  -h, --help     Show this message',
  \]
  AssertLinter 'syntaxerl', [
  \ ale#Escape('syntaxerl') . ' -h',
  \ ale#Escape('syntaxerl') . ' -b %s %t',
  \]