summaryrefslogtreecommitdiff
path: root/test/command_callback/test_mypy_command_callback.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-08 22:59:25 +0100
committerw0rp <devw0rp@gmail.com>2017-05-08 22:59:25 +0100
commit6ea00af6895e111320a2047f43f94792a46b6cea (patch)
tree8a941fa08834e5dd512f3136b3c9b836ebf1b3d4 /test/command_callback/test_mypy_command_callback.vader
parent28c6ec9cad3064966ff70c9da95c96364118eb57 (diff)
downloadale-6ea00af6895e111320a2047f43f94792a46b6cea.zip
#540 Fix shell escaping pretty much everywhere
Diffstat (limited to 'test/command_callback/test_mypy_command_callback.vader')
-rw-r--r--test/command_callback/test_mypy_command_callback.vader14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/command_callback/test_mypy_command_callback.vader b/test/command_callback/test_mypy_command_callback.vader
index ec82c879..14c9af43 100644
--- a/test/command_callback/test_mypy_command_callback.vader
+++ b/test/command_callback/test_mypy_command_callback.vader
@@ -20,7 +20,7 @@ Execute(The mypy callbacks should return the correct default values):
\ 'mypy',
\ ale_linters#python#mypy#GetExecutable(bufnr(''))
AssertEqual
- \ 'cd ' . g:dir . ' && mypy --show-column-numbers %s',
+ \ 'cd ''' . g:dir . ''' && ''mypy'' --show-column-numbers %s',
\ ale_linters#python#mypy#GetCommand(bufnr(''))
Execute(The mypy executable should be configurable, and escaped properly):
@@ -30,14 +30,14 @@ Execute(The mypy executable should be configurable, and escaped properly):
\ 'executable with spaces',
\ ale_linters#python#mypy#GetExecutable(bufnr(''))
AssertEqual
- \ 'cd ' . g:dir . ' && executable\ with\ spaces --show-column-numbers %s',
+ \ 'cd ''' . g:dir . ''' && ''executable with spaces'' --show-column-numbers %s',
\ ale_linters#python#mypy#GetCommand(bufnr(''))
Execute(The mypy command callback should let you set options):
let g:ale_python_mypy_options = '--some-option'
AssertEqual
- \ 'cd ' . g:dir . ' && mypy --show-column-numbers --some-option %s',
+ \ 'cd ''' . g:dir . ''' && ''mypy'' --show-column-numbers --some-option %s',
\ ale_linters#python#mypy#GetCommand(bufnr(''))
Execute(The mypy command should switch directories to the detected project root):
@@ -47,7 +47,7 @@ Execute(The mypy command should switch directories to the detected project root)
\ 'mypy',
\ ale_linters#python#mypy#GetExecutable(bufnr(''))
AssertEqual
- \ 'cd ' . g:dir . '/python_paths/no_virtualenv/subdir && mypy --show-column-numbers %s',
+ \ 'cd ''' . g:dir . '/python_paths/no_virtualenv/subdir'' && ''mypy'' --show-column-numbers %s',
\ ale_linters#python#mypy#GetCommand(bufnr(''))
Execute(The mypy callbacks should detect virtualenv directories and switch to the project root):
@@ -57,8 +57,8 @@ Execute(The mypy callbacks should detect virtualenv directories and switch to th
\ g:dir . '/python_paths/with_virtualenv/env/bin/mypy',
\ ale_linters#python#mypy#GetExecutable(bufnr(''))
AssertEqual
- \ 'cd ' . g:dir . '/python_paths/with_virtualenv/subdir && '
- \ . g:dir . '/python_paths/with_virtualenv/env/bin/mypy --show-column-numbers %s',
+ \ 'cd ''' . g:dir . '/python_paths/with_virtualenv/subdir'' && '''
+ \ . g:dir . '/python_paths/with_virtualenv/env/bin/mypy'' --show-column-numbers %s',
\ ale_linters#python#mypy#GetCommand(bufnr(''))
Execute(You should able able to use the global mypy instead):
@@ -69,5 +69,5 @@ Execute(You should able able to use the global mypy instead):
\ 'mypy',
\ ale_linters#python#mypy#GetExecutable(bufnr(''))
AssertEqual
- \ 'cd ' . g:dir . '/python_paths/with_virtualenv/subdir && mypy --show-column-numbers %s',
+ \ 'cd ''' . g:dir . '/python_paths/with_virtualenv/subdir'' && ''mypy'' --show-column-numbers %s',
\ ale_linters#python#mypy#GetCommand(bufnr(''))