summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_prepare_command.vader9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_prepare_command.vader b/test/test_prepare_command.vader
index 75e4c0c6..f90c881b 100644
--- a/test/test_prepare_command.vader
+++ b/test/test_prepare_command.vader
@@ -4,6 +4,7 @@ Before:
After:
Restore
+ let g:ale_shell = v:null
Execute(sh should be used when the shell is fish):
if !has('win32')
@@ -43,6 +44,7 @@ Execute(Other shells should be used when set):
if !has('win32')
let &shell = '/bin/bash'
let &shellcmdflag = '-c'
+ let g:ale_shell = &shell
AssertEqual ['/bin/bash', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar')
endif
@@ -54,3 +56,10 @@ Execute(cmd /s/c as a string should be used on Windows):
AssertEqual 'cmd /s/c "foobar"', ale#job#PrepareCommand(bufnr(''), 'foobar')
endif
+
+Execute(Setting ale_shell should cause ale#job#PrepareCommand to use set shell):
+ if !has('win32')
+ let g:ale_shell = '/foo/bar'
+
+ AssertEqual ['/foo/bar', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar")
+ endif