This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/command_callback/test_erlang_syntaxerl_command_callback.vader

46 lines
1.3 KiB
Text
Raw Normal View History

2017-08-19 14:10:03 +00:00
Before:
call ale#assert#SetUpLinterTest('erlang', 'syntaxerl')
2017-08-19 14:10:03 +00:00
After:
call ale#assert#TearDownLinterTest()
2017-08-19 14:10:03 +00:00
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'
2017-08-19 14:10:03 +00:00
AssertLinter 'foobar', [
\ ale#Escape('foobar') . ' -h',
\ ale#Escape('foobar') . ' %t',
\]
Execute (The -b option should be used when available):
GivenCommandOutput [
\ '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',
\]
GivenCommandOutput [
\ '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',
\]