From 795da343bbf99c4b77d10cd5035c29df23f113ae Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 17 Feb 2018 02:25:51 -0500 Subject: test: win: emulate yes with for loop --- test/functional/eval/system_spec.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/functional/eval') diff --git a/test/functional/eval/system_spec.lua b/test/functional/eval/system_spec.lua index 7fe79d4351..446afefb59 100644 --- a/test/functional/eval/system_spec.lua +++ b/test/functional/eval/system_spec.lua @@ -188,8 +188,9 @@ describe('system()', function() end) it('`yes` and is interrupted with CTRL-C', function() - if helpers.pending_win32(pending) then return end - feed(':call system("yes")') + feed(':call system("' .. (iswin() + and 'for /L %I in (1,0,2) do @echo y' + or 'yes') .. '")') screen:expect([[ | ~ | @@ -204,8 +205,11 @@ describe('system()', function() ~ | ~ | ~ | - :call system("yes") | - ]]) +]] .. (iswin() + and [[ + :call system("for /L %I in (1,0,2) do @echo y") |]] + or [[ + :call system("yes") |]])) feed('') screen:expect([[ ^ | -- cgit