2017-08-19 14:10:03 +00:00
|
|
|
Before:
|
|
|
|
Save g:ale_erlang_syntaxerl_executable
|
2017-08-19 14:48:29 +00:00
|
|
|
Save g:ale_erlang_syntaxerl_use_basename
|
|
|
|
|
|
|
|
unlet! g:ale_erlang_syntaxerl_executable
|
|
|
|
unlet! b:ale_erlang_syntaxerl_executable
|
|
|
|
unlet! b:ale_erlang_syntaxerl_use_basename
|
|
|
|
|
2017-08-19 14:10:03 +00:00
|
|
|
runtime ale_linters/erlang/syntaxerl.vim
|
|
|
|
|
|
|
|
After:
|
2017-08-19 14:48:29 +00:00
|
|
|
Restore
|
|
|
|
|
2017-08-19 14:10:03 +00:00
|
|
|
call ale#linter#Reset()
|
|
|
|
|
2017-08-19 14:48:29 +00:00
|
|
|
|
|
|
|
Execute (The SyntaxErl executable should be correct):
|
2017-08-19 14:10:03 +00:00
|
|
|
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(''))
|
|
|
|
|
2017-08-19 14:48:29 +00:00
|
|
|
Execute (The default SyntaxErl command should be correct):
|
|
|
|
AssertEqual 'syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))
|
2017-08-19 14:10:03 +00:00
|
|
|
|
2017-08-19 14:48:29 +00:00
|
|
|
Execute (The executable name should be used in the command):
|
2017-08-19 14:10:03 +00:00
|
|
|
let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl'
|
2017-08-19 14:48:29 +00:00
|
|
|
AssertEqual '/some/other/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))
|
2017-08-19 14:10:03 +00:00
|
|
|
|
|
|
|
let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl'
|
2017-08-19 14:48:29 +00:00
|
|
|
AssertEqual '/yet/another/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))
|
|
|
|
|
|
|
|
Execute (The basename option should be set when the option is on):
|
|
|
|
let b:ale_erlang_syntaxerl_use_basename = 1
|
|
|
|
|
|
|
|
AssertEqual 'syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))
|