summaryrefslogtreecommitdiff
path: root/test/command_callback
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-04-17 13:30:30 +0100
committerw0rp <devw0rp@gmail.com>2018-04-17 13:30:30 +0100
commitf9ba3d924fc445ceea6ab7a6700b95dd12d268ca (patch)
tree41d169514dc43d61f71e7bdf3052af9789015310 /test/command_callback
parentfb720251bf38139c1811665852e1bc2f73d0393f (diff)
downloadale-f9ba3d924fc445ceea6ab7a6700b95dd12d268ca.zip
Fix #1507 - Add an option for disabling switching directories for pylint
Diffstat (limited to 'test/command_callback')
-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 5dc6abe9..1cdc34d4 100644
--- a/test/command_callback/test_pylint_command_callback.vader
+++ b/test/command_callback/test_pylint_command_callback.vader
@@ -2,10 +2,12 @@ Before:
Save g:ale_python_pylint_executable
Save g:ale_python_pylint_options
Save g:ale_python_pylint_use_global
+ Save g:ale_python_pylint_change_directory
unlet! g:ale_python_pylint_executable
unlet! g:ale_python_pylint_options
unlet! g:ale_python_pylint_use_global
+ unlet! g:ale_python_pylint_change_directory
runtime ale_linters/python/pylint.vim
call ale#test#SetDirectory('/testplugin/test/command_callback')
@@ -32,6 +34,17 @@ Execute(The pylint callbacks should return the correct default values):
\ . ale#Escape('pylint') . ' ' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))
+Execute(The option for disabling changing directories should work):
+ let g:ale_python_pylint_change_directory = 0
+
+ AssertEqual
+ \ 'pylint',
+ \ ale_linters#python#pylint#GetExecutable(bufnr(''))
+ \
+ AssertEqual
+ \ ale#Escape('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'