diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-02-17 02:25:51 -0500 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-02-19 07:10:46 -0500 |
commit | 795da343bbf99c4b77d10cd5035c29df23f113ae (patch) | |
tree | 68f953578a25af6ce4b9333533557db6548137c9 | |
parent | 07dfe0f5ea31521679926b7aeacde5e3944246ea (diff) | |
download | rneovim-795da343bbf99c4b77d10cd5035c29df23f113ae.tar.gz rneovim-795da343bbf99c4b77d10cd5035c29df23f113ae.tar.bz2 rneovim-795da343bbf99c4b77d10cd5035c29df23f113ae.zip |
test: win: emulate yes with for loop
-rw-r--r-- | test/functional/eval/system_spec.lua | 12 | ||||
-rw-r--r-- | test/functional/ui/wildmode_spec.lua | 7 |
2 files changed, 11 insertions, 8 deletions
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")<cr>') + feed(':call system("' .. (iswin() + and 'for /L %I in (1,0,2) do @echo y' + or 'yes') .. '")<cr>') 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('<c-c>') screen:expect([[ ^ | diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index 946194ed13..c6ddc78618 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -60,15 +60,14 @@ describe("'wildmenu'", function() command('set wildmenu wildmode=full') command('set scrollback=4') if iswin() then - helpers.set_shell_powershell() - feed([[:terminal for ($i = 1; $i -le 5000; $i++) {Write-Output foo foo foo; Start-Sleep -Milliseconds 100}<cr>]]) + feed([[:terminal for /L \%I in (1,1,5000) do @(echo foo & echo foo & echo foo)<cr>]]) else feed([[:terminal for i in $(seq 1 5000); do printf 'foo\nfoo\nfoo\n'; sleep 0.1; done<cr>]]) end feed([[<C-\><C-N>gg]]) feed([[:sign <Tab>]]) -- Invoke wildmenu. - screen:sleep(iswin() and 500 or 50) -- Allow some terminal output. + screen:sleep(50) -- Allow some terminal output. screen:expect([[ foo | foo | @@ -80,7 +79,7 @@ describe("'wildmenu'", function() -- cmdline CTRL-D display should also be preserved. feed([[<C-\><C-N>]]) feed([[:sign <C-D>]]) -- Invoke cmdline CTRL-D. - screen:sleep(iswin() and 500 or 50) -- Allow some terminal output. + screen:sleep(50) -- Allow some terminal output. screen:expect([[ :sign | define place | |