mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-24 13:01:28 +08:00
add tests for ale_shell option
This commit is contained in:
@@ -4,6 +4,7 @@ Before:
|
||||
|
||||
After:
|
||||
Restore
|
||||
let g:ale_shell = &shell
|
||||
|
||||
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,8 @@ 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):
|
||||
let g:ale_shell = '/foo/bar'
|
||||
|
||||
AssertEqual ['/foo/bar', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar")
|
||||
|
||||
Reference in New Issue
Block a user