tests: fix "system() … prints verbose information" (#10532)

It would previously fail with `set shell=sh` (no slash).

For the test itself we can just use a non-existing (fake) shell, because
it is only about the verbose output.

Ref: https://github.com/neovim/neovim/issues/9330
This commit is contained in:
Daniel Hahler
2019-07-17 23:05:04 +02:00
committed by GitHub
parent 353b3852fd
commit 4fc91fe365

View File

@@ -203,12 +203,15 @@ describe('system()', function()
end)
it('prints verbose information', function()
nvim('set_option', 'shell', 'fake_shell')
nvim('set_option', 'shellcmdflag', 'cmdflag')
screen:try_resize(72, 14)
feed(':4verbose echo system("echo hi")<cr>')
if iswin() then
screen:expect{any=[[Executing command: "'cmd.exe' '/s' '/c' '"echo hi"'"]]}
screen:expect{any=[[Executing command: "'fake_shell' 'cmdflag' '"echo hi"'"]]}
else
screen:expect{any=[[Executing command: "'/[^']*sh' '%-c' 'echo hi'"]]}
screen:expect{any=[[Executing command: "'fake_shell' 'cmdflag' 'echo hi'"]]}
end
feed('<cr>')
end)