2017-08-19 10:10:03 -04:00
|
|
|
Before:
|
|
|
|
Save g:ale_erlang_syntaxerl_executable
|
2017-08-19 10:48:29 -04:00
|
|
|
|
|
|
|
unlet! g:ale_erlang_syntaxerl_executable
|
|
|
|
unlet! b:ale_erlang_syntaxerl_executable
|
|
|
|
|
2017-08-19 10:10:03 -04:00
|
|
|
runtime ale_linters/erlang/syntaxerl.vim
|
|
|
|
|
2017-08-19 13:54:23 -04:00
|
|
|
|
2017-08-19 10:10:03 -04:00
|
|
|
After:
|
2017-08-19 10:48:29 -04:00
|
|
|
Restore
|
|
|
|
|
2017-08-19 10:10:03 -04:00
|
|
|
call ale#linter#Reset()
|
|
|
|
|
2017-08-19 10:48:29 -04:00
|
|
|
|
2017-08-19 13:54:23 -04:00
|
|
|
Execute (The executable should be correct):
|
2017-08-19 10:10:03 -04: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 13:54:23 -04:00
|
|
|
Execute (The executable should be presented in the feature check command):
|
2017-08-19 10:10:03 -04:00
|
|
|
let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl'
|
2017-08-19 13:54:23 -04:00
|
|
|
AssertEqual "'/some/other/syntaxerl' -h", ale_linters#erlang#syntaxerl#FeatureCheck(bufnr(''))
|
2017-08-19 10:10:03 -04:00
|
|
|
|
|
|
|
let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl'
|
2017-08-19 13:54:23 -04:00
|
|
|
AssertEqual "'/yet/another/syntaxerl' -h", ale_linters#erlang#syntaxerl#FeatureCheck(bufnr(''))
|
|
|
|
|
2017-08-19 10:48:29 -04:00
|
|
|
|
2017-08-19 13:54:23 -04:00
|
|
|
Execute (The executable should be presented in the command):
|
|
|
|
let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl'
|
|
|
|
AssertEqual "'/some/other/syntaxerl' %t", ale_linters#erlang#syntaxerl#GetCommand(bufnr(''), [])
|
2017-08-19 10:48:29 -04:00
|
|
|
|
2017-08-19 13:54:23 -04:00
|
|
|
let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl'
|
|
|
|
AssertEqual "'/yet/another/syntaxerl' %t", ale_linters#erlang#syntaxerl#GetCommand(bufnr(''), [])
|
|
|
|
|
|
|
|
|
|
|
|
Execute (The -b option should be used when available):
|
|
|
|
AssertEqual "'syntaxerl' %t", ale_linters#erlang#syntaxerl#GetCommand(bufnr(''), [
|
|
|
|
\ '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',
|
|
|
|
\ ])
|
|
|
|
|
|
|
|
AssertEqual "'syntaxerl' -b %s %t", ale_linters#erlang#syntaxerl#GetCommand(bufnr(''), [
|
|
|
|
\ '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',
|
|
|
|
\ ])
|