summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-06 21:20:02 +0100
committerw0rp <devw0rp@gmail.com>2017-05-06 21:20:02 +0100
commit07bcbd4c06516a03b8d8f5ff8a9293917aed3277 (patch)
treeb7aadfd773c0e741b0f6da1bae623b35c7e560e8 /test
parentf2c9fc403a5c25a3b9265095f3b6d4cfac80c99e (diff)
downloadale-07bcbd4c06516a03b8d8f5ff8a9293917aed3277.zip
Escape the pylint executable appropriately
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/test_pylint_command_callback.vader13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/command_callback/test_pylint_command_callback.vader b/test/command_callback/test_pylint_command_callback.vader
index 7c8e4080..533d06a2 100644
--- a/test/command_callback/test_pylint_command_callback.vader
+++ b/test/command_callback/test_pylint_command_callback.vader
@@ -6,6 +6,9 @@ Before:
After:
silent execute 'cd ' . fnameescape(g:dir)
+ " Set the file to something else,
+ " or we'll cause issues when running other tests
+ silent file 'dummy.py'
unlet! g:dir
call ale#linter#Reset()
@@ -21,6 +24,16 @@ Execute(The pylint callbacks should return the correct default values):
\ 'pylint ' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))
+Execute(The pylint executable should be configurable, and escaped properly):
+ let g:ale_python_pylint_executable = 'executable with spaces'
+
+ AssertEqual
+ \ 'executable with spaces',
+ \ ale_linters#python#pylint#GetExecutable(bufnr(''))
+ AssertEqual
+ \ 'executable\ with\ spaces ' . b:command_tail,
+ \ ale_linters#python#pylint#GetCommand(bufnr(''))
+
Execute(The pylint command callback should let you set options):
let g:ale_python_pylint_options = '--some-option'