2017-08-19 14:10:03 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('erlang', 'syntaxerl')
|
2017-08-19 14:10:03 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-08-19 14:10:03 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
Execute (The default commands should be correct):
|
|
|
|
AssertLinter 'syntaxerl', [
|
|
|
|
\ ale#Escape('syntaxerl') . ' -h',
|
|
|
|
\ ale#Escape('syntaxerl') . ' %t',
|
|
|
|
\]
|
2017-10-08 22:26:50 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
Execute (The executable should be configurable):
|
|
|
|
let b:ale_erlang_syntaxerl_executable = 'foobar'
|
2017-08-19 14:10:03 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'foobar', [
|
|
|
|
\ ale#Escape('foobar') . ' -h',
|
|
|
|
\ ale#Escape('foobar') . ' %t',
|
|
|
|
\]
|
2017-08-19 17:54:23 +00:00
|
|
|
|
|
|
|
Execute (The -b option should be used when available):
|
2019-04-07 13:58:06 +00:00
|
|
|
GivenCommandOutput [
|
2018-07-15 17:24:53 +00:00
|
|
|
\ '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',
|
|
|
|
\]
|
|
|
|
|
2019-04-07 13:58:06 +00:00
|
|
|
GivenCommandOutput [
|
2018-07-15 17:24:53 +00:00
|
|
|
\ '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',
|
|
|
|
\]
|