From ecdd2df88ab52ed6e39057e2a8fb9eabfbb90bd5 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 21 Sep 2018 09:20:04 +0200 Subject: shell/logging: Fix E730 with verbose system({List}) #9009 ref https://github.com/neovim/neovim/issues/9001#issuecomment-421843790 Steps to reproduce: :set verbose=9 :call system(['echo']) E730: using List as a String --- test/functional/eval/system_spec.lua | 22 ++++++---------------- test/functional/ui/screen.lua | 2 +- 2 files changed, 7 insertions(+), 17 deletions(-) (limited to 'test/functional') diff --git a/test/functional/eval/system_spec.lua b/test/functional/eval/system_spec.lua index 0d84f47b65..5cbf34365b 100644 --- a/test/functional/eval/system_spec.lua +++ b/test/functional/eval/system_spec.lua @@ -203,23 +203,13 @@ describe('system()', function() end) it('prints verbose information', function() + screen:try_resize(72, 14) feed(':4verbose echo system("echo hi")') - screen:expect([[ - | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | - ~ | - | - Calling shell to execute: "echo hi" | - | - hi | - | - Press ENTER or type command to continue^ | - ]]) + if iswin() then + screen:expect{any=[[Executing command: "'cmd.exe' '/s' '/c' '"echo hi"'"]]} + else + screen:expect{any=[[Executing command: "'/[^']*sh' '%-c' 'echo hi'"]]} + end feed('') end) diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 364b65c581..3831968f5b 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -243,7 +243,7 @@ local ext_keys = { -- nothing is ignored. -- condition: Function asserting some arbitrary condition. Return value is -- ignored, throw an error (use eq() or similar) to signal failure. --- any: A string that should be present on any line of the screen. +-- any: Lua pattern string expected to match a screen line. -- mode: Expected mode as signaled by "mode_change" event -- -- The following keys should be used to expect the state of various ext_ -- cgit