aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/system_spec.lua
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-07-17 23:05:04 +0200
committerGitHub <noreply@github.com>2019-07-17 23:05:04 +0200
commit4fc91fe365fc229928d9e3dc89a6b3b264bdd8f3 (patch)
tree9b32d7d548a6c101e9d26fcbb540a647b3df244b /test/functional/eval/system_spec.lua
parent353b3852fd03168585d868c5c7580e2f0599cb19 (diff)
downloadrneovim-4fc91fe365fc229928d9e3dc89a6b3b264bdd8f3.tar.gz
rneovim-4fc91fe365fc229928d9e3dc89a6b3b264bdd8f3.tar.bz2
rneovim-4fc91fe365fc229928d9e3dc89a6b3b264bdd8f3.zip
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
Diffstat (limited to 'test/functional/eval/system_spec.lua')
-rw-r--r--test/functional/eval/system_spec.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/eval/system_spec.lua b/test/functional/eval/system_spec.lua
index 5cbf34365b..865a890acf 100644
--- a/test/functional/eval/system_spec.lua
+++ b/test/functional/eval/system_spec.lua
@@ -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)