summaryrefslogtreecommitdiff
path: root/test/test_linter_defintion_processing.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-02-12 18:05:33 +0000
committerw0rp <devw0rp@gmail.com>2019-02-12 18:05:33 +0000
commit926ad47a49d74c910c610d4a9cedd5c4838d679d (patch)
tree9f86511f8854e9965978092fcb233a34e3516440 /test/test_linter_defintion_processing.vader
parentbf196ba17c9e261e4e3a9dba64260c6d0b2c8af9 (diff)
downloadale-926ad47a49d74c910c610d4a9cedd5c4838d679d.zip
#2132 - Implement deferred executable string 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 d967761d..321c6212 100644
--- a/test/test_linter_defintion_processing.vader
+++ b/test/test_linter_defintion_processing.vader
@@ -48,7 +48,7 @@ Execute (PreProcess should throw when executable is not a string):
\ 'executable': 123,
\ 'command': 'echo',
\})
- AssertEqual '`executable` must be a string if defined', g:vader_exception
+ AssertEqual '`executable` must be a String or Function if defined', g:vader_exception
Execute (PreProcess should throw when executable_callback is not a callback):
AssertThrows call ale#linter#PreProcess('testft', {
@@ -59,6 +59,14 @@ Execute (PreProcess should throw when executable_callback is not a callback):
\})
AssertEqual '`executable_callback` must be a callback if defined', g:vader_exception
+Execute (PreProcess should allow executable to be a callback):
+ call ale#linter#PreProcess('testft', {
+ \ 'name': 'foo',
+ \ 'callback': 'SomeFunction',
+ \ 'executable': function('type'),
+ \ 'command': 'echo',
+ \})
+
Execute (PreProcess should throw when there is no command):
AssertThrows call ale#linter#PreProcess('testft', {
\ 'name': 'foo',