summaryrefslogtreecommitdiff
path: root/test/command_callback/test_erlang_syntaxerl_command_callback.vader
blob: 821444adc0c1ab38490ce96873887901cd42d1ba (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
Before:
  Save g:ale_erlang_syntaxerl_executable
  unlet! g:ale_erlang_syntaxerl_executable b:ale_erlang_syntaxerl_executable
  runtime ale_linters/erlang/syntaxerl.vim

After:
  call ale#linter#Reset()
  Restore g:ale_erlang_syntaxerl_executable

Execute (Get SyntaxErl executable):
  AssertEqual 'syntaxerl', ale_linters#erlang#syntaxerl#GetExecutable(bufnr(''))

  let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl'
  AssertEqual '/some/other/syntaxerl', ale_linters#erlang#syntaxerl#GetExecutable(bufnr(''))

  let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl'
  AssertEqual '/yet/another/syntaxerl', ale_linters#erlang#syntaxerl#GetExecutable(bufnr(''))

Execute (Get SyntaxErl command line):
  AssertEqual 'syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))

  let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl'
  AssertEqual '/some/other/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))

  let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl'
  AssertEqual '/yet/another/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))