diff options
author | w0rp <devw0rp@gmail.com> | 2018-04-12 21:01:35 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-04-12 21:01:35 +0100 |
commit | a0aa9aa9b721a73e81dd0091f37826d5e8a336d2 (patch) | |
tree | ce04033757cecd83120f8897bd76ae4882ac693e /test/test_prepare_command.vader | |
parent | 0cd8e8630b69613df3a2a65fdd830364de157129 (diff) | |
download | ale-a0aa9aa9b721a73e81dd0091f37826d5e8a336d2.zip |
Fix #1495 - Fall back to /bin/sh when shell=pwsh
Diffstat (limited to 'test/test_prepare_command.vader')
-rw-r--r-- | test/test_prepare_command.vader | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test_prepare_command.vader b/test/test_prepare_command.vader index ed9272ab..75e4c0c6 100644 --- a/test/test_prepare_command.vader +++ b/test/test_prepare_command.vader @@ -22,6 +22,23 @@ Execute(sh should be used when the shell is fish): AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') endif +Execute(sh should be used when the shell is powershell): + if !has('win32') + " Set something else, so we will replace that too. + let &shellcmdflag = '-f' + let &shell = 'pwsh' + + AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') + + let &shell = '/usr/bin/pwsh' + + AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') + + let &shell = '/usr/local/bin/pwsh' + + AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar') + endif + Execute(Other shells should be used when set): if !has('win32') let &shell = '/bin/bash' |