From 4fc91fe365fc229928d9e3dc89a6b3b264bdd8f3 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 17 Jul 2019 23:05:04 +0200 Subject: [PATCH] =?UTF-8?q?tests:=20fix=20"system()=20=E2=80=A6=20prints?= =?UTF-8?q?=20verbose=20information"=20(#10532)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- test/functional/eval/system_spec.lua | 7 +++++-- 1 file 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")') 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('') end)