summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrhysd <lin90162@yahoo.co.jp>2018-04-09 16:41:35 +0900
committerrhysd <lin90162@yahoo.co.jp>2018-04-09 16:43:10 +0900
commit4903b966a7fb29c9c74a7e1abf21de4ff8dd0028 (patch)
treee6ec6b926fa2267ba0ce8700563706b28c53d251 /test
parent2f2dcb84444f440ceb4b35010b861738216525f6 (diff)
downloadale-4903b966a7fb29c9c74a7e1abf21de4ff8dd0028.zip
pylint: Move to the buffer's directory before running pylint command (Fix #1472)
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/test_pylint_command_callback.vader18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/command_callback/test_pylint_command_callback.vader b/test/command_callback/test_pylint_command_callback.vader
index 1ff8e354..5dc6abe9 100644
--- a/test/command_callback/test_pylint_command_callback.vader
+++ b/test/command_callback/test_pylint_command_callback.vader
@@ -28,7 +28,8 @@ Execute(The pylint callbacks should return the correct default values):
\ 'pylint',
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
AssertEqual
- \ ale#Escape('pylint') . ' ' . b:command_tail,
+ \ ale#path#BufferCdString(bufnr(''))
+ \ . ale#Escape('pylint') . ' ' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))
Execute(The pylint executable should be configurable, and escaped properly):
@@ -38,14 +39,16 @@ Execute(The pylint executable should be configurable, and escaped properly):
\ 'executable with spaces',
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
AssertEqual
- \ ale#Escape('executable with spaces') . ' ' . b:command_tail,
+ \ ale#path#BufferCdString(bufnr(''))
+ \ . ale#Escape('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'
AssertEqual
- \ ale#Escape('pylint') . ' --some-option' . b:command_tail,
+ \ ale#path#BufferCdString(bufnr(''))
+ \ . ale#Escape('pylint') . ' --some-option' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))
Execute(The pylint callbacks shouldn't detect virtualenv directories where they don't exist):
@@ -55,7 +58,8 @@ Execute(The pylint callbacks shouldn't detect virtualenv directories where they
\ 'pylint',
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
AssertEqual
- \ ale#Escape('pylint') . ' ' . b:command_tail,
+ \ ale#path#BufferCdString(bufnr(''))
+ \ . ale#Escape('pylint') . ' ' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))
Execute(The pylint callbacks should detect virtualenv directories):
@@ -70,7 +74,8 @@ Execute(The pylint callbacks should detect virtualenv directories):
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
AssertEqual
- \ ale#Escape(b:executable) . ' ' . b:command_tail,
+ \ ale#path#BufferCdString(bufnr(''))
+ \ . ale#Escape(b:executable) . ' ' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))
Execute(You should able able to use the global pylint instead):
@@ -81,5 +86,6 @@ Execute(You should able able to use the global pylint instead):
\ 'pylint',
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
AssertEqual
- \ ale#Escape('pylint') . ' ' . b:command_tail,
+ \ ale#path#BufferCdString(bufnr(''))
+ \ . ale#Escape('pylint') . ' ' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))