summaryrefslogtreecommitdiff
path: root/test/test_prepare_command.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_prepare_command.vader')
-rw-r--r--test/test_prepare_command.vader16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/test_prepare_command.vader b/test/test_prepare_command.vader
index f90c881b..4a12b9d0 100644
--- a/test/test_prepare_command.vader
+++ b/test/test_prepare_command.vader
@@ -1,10 +1,14 @@
Before:
Save &shell
Save &shellcmdflag
+ Save g:ale_shell
+ Save g:ale_shell_arguments
+
+ unlet! g:ale_shell
+ unlet! g:ale_shell_arguments
After:
Restore
- let g:ale_shell = v:null
Execute(sh should be used when the shell is fish):
if !has('win32')
@@ -58,8 +62,10 @@ Execute(cmd /s/c as a string should be used on Windows):
endif
Execute(Setting ale_shell should cause ale#job#PrepareCommand to use set shell):
- if !has('win32')
- let g:ale_shell = '/foo/bar'
+ let g:ale_shell = '/foo/bar'
- AssertEqual ['/foo/bar', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar")
- endif
+ AssertEqual ['/foo/bar', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar")
+
+ let g:ale_shell_arguments = '-x'
+
+ AssertEqual ['/foo/bar', '-x', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar")