diff options
author | w0rp <devw0rp@gmail.com> | 2017-02-09 20:44:13 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-02-09 20:44:13 +0000 |
commit | 9f8c76b5b939c3a73937069dc1c29efeb2eae49f (patch) | |
tree | 2c7016aeb63157a85b4ec5a64ad5b916ae69a196 /test/test_linter_defintion_processing.vader | |
parent | 38d9802d12118999dfbb1bba40b84288f655d148 (diff) | |
download | ale-9f8c76b5b939c3a73937069dc1c29efeb2eae49f.zip |
Make ALE complain when conflicting command options are used
Diffstat (limited to 'test/test_linter_defintion_processing.vader')
-rw-r--r-- | test/test_linter_defintion_processing.vader | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/test_linter_defintion_processing.vader b/test/test_linter_defintion_processing.vader index 4b5c6a76..969a8932 100644 --- a/test/test_linter_defintion_processing.vader +++ b/test/test_linter_defintion_processing.vader @@ -211,3 +211,26 @@ Execute(PreProcess should complain about invalid chain items at higher indices): \} AssertThrows call ale#linter#PreProcess(g:linter) AssertEqual 'The `command_chain` item 1 must define a `callback` function', g:vader_exception + +Execute(PreProcess should complain when conflicting command options are used): + let g:linter = { + \ 'name': 'x', + \ 'callback': 'x', + \ 'executable': 'x', + \ 'command': 'foo', + \ 'command_chain': [{'callback': 'foo'}], + \} + AssertThrows call ale#linter#PreProcess(g:linter) + AssertEqual 'Only one of `command`, `command_callback`, or `command_chain` should be set', g:vader_exception + + unlet g:linter.command + let g:linter.command_callback = 'foo' + + AssertThrows call ale#linter#PreProcess(g:linter) + AssertEqual 'Only one of `command`, `command_callback`, or `command_chain` should be set', g:vader_exception + + let g:linter.command = 'foo' + unlet g:linter.command_chain + + AssertThrows call ale#linter#PreProcess(g:linter) + AssertEqual 'Only one of `command`, `command_callback`, or `command_chain` should be set', g:vader_exception |