mirror of
https://github.com/neovim/neovim.git
synced 2025-10-22 17:11:49 +00:00
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:
@@ -203,12 +203,15 @@ describe('system()', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('prints verbose information', function()
|
it('prints verbose information', function()
|
||||||
|
nvim('set_option', 'shell', 'fake_shell')
|
||||||
|
nvim('set_option', 'shellcmdflag', 'cmdflag')
|
||||||
|
|
||||||
screen:try_resize(72, 14)
|
screen:try_resize(72, 14)
|
||||||
feed(':4verbose echo system("echo hi")<cr>')
|
feed(':4verbose echo system("echo hi")<cr>')
|
||||||
if iswin() then
|
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
|
else
|
||||||
screen:expect{any=[[Executing command: "'/[^']*sh' '%-c' 'echo hi'"]]}
|
screen:expect{any=[[Executing command: "'fake_shell' 'cmdflag' 'echo hi'"]]}
|
||||||
end
|
end
|
||||||
feed('<cr>')
|
feed('<cr>')
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user