summaryrefslogtreecommitdiff
path: root/test/test_linter_defintion_processing.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-02-21 21:24:41 +0000
committerw0rp <devw0rp@gmail.com>2019-02-21 21:24:41 +0000
commitffa45fa3fb44ade28c64aa8f0a21acd71c903a2a (patch)
tree350f4b45b17a1862844a14856c4063c0d219f0bd /test/test_linter_defintion_processing.vader
parenta8b987a1c31f297622f0038230d23404e7c2ad50 (diff)
downloadale-ffa45fa3fb44ade28c64aa8f0a21acd71c903a2a.zip
#2132 - Implement deferred command handling for linters
Diffstat (limited to 'test/test_linter_defintion_processing.vader')
-rw-r--r--test/test_linter_defintion_processing.vader10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/test_linter_defintion_processing.vader b/test/test_linter_defintion_processing.vader
index 321c6212..0f54cf0e 100644
--- a/test/test_linter_defintion_processing.vader
+++ b/test/test_linter_defintion_processing.vader
@@ -82,7 +82,15 @@ Execute (PreProcess should throw when command is not a string):
\ 'executable': 'echo',
\ 'command': [],
\})
- AssertEqual '`command` must be a string if defined', g:vader_exception
+ AssertEqual '`command` must be a String or Function if defined', g:vader_exception
+
+Execute (PreProcess should allow command to be a callback):
+ call ale#linter#PreProcess('testft', {
+ \ 'name': 'foo',
+ \ 'callback': 'SomeFunction',
+ \ 'executable': 'echo',
+ \ 'command': function('type'),
+ \})
Execute (PreProcess should throw when command_callback is not a callback):
AssertThrows call ale#linter#PreProcess('testft', {