diff options
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/inccommand_spec.lua | 48 | ||||
-rw-r--r-- | test/functional/ui/wildmode_spec.lua | 18 |
2 files changed, 9 insertions, 57 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index 238cc368da..351c4b4bcf 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -16,8 +16,8 @@ local retry = helpers.retry local source = helpers.source local wait = helpers.wait local nvim = helpers.nvim -local iswin = helpers.iswin local sleep = helpers.sleep +local nvim_dir = helpers.nvim_dir local default_text = [[ Inc substitution on @@ -2555,56 +2555,18 @@ it(':substitute with inccommand during :terminal activity', function() clear() command("set cmdwinheight=3") - if iswin() then - feed([[:terminal for /L \%I in (1,1,5000) do @(echo xxx & echo xxx & echo xxx)<cr>]]) - else - feed([[:terminal for i in $(seq 1 5000); do printf 'xxx\nxxx\nxxx\n'; done<cr>]]) - end + feed([[:terminal "]]..nvim_dir..[[/shell-test" REP 5000 xxx<cr>]]) command('file term') + feed('G') -- Follow :terminal output. command('new') common_setup(screen, 'split', 'foo bar baz\nbar baz fox\nbar foo baz') command('wincmd =') - -- Wait for terminal output. - screen:expect([[ - bar baz fox | - bar foo ba^z | - {15:~ }| - {15:~ }| - {15:~ }| - {15:~ }| - {11:[No Name] [+] }| - xxx | - xxx | - xxx | - xxx | - xxx | - xxx | - {10:term }| - | - ]]) - feed('gg') feed(':%s/foo/ZZZ') sleep(20) -- Allow some terminal activity. - screen:expect([[ - {12:ZZZ} bar baz | - bar baz fox | - bar {12:ZZZ} baz | - {15:~ }| - {15:~ }| - {15:~ }| - {11:[No Name] [+] }| - xxx | - xxx | - {10:term }| - |1| {12:ZZZ} bar baz | - |3| bar {12:ZZZ} baz | - {15:~ }| - {10:[Preview] }| - :%s/foo/ZZZ^ | - ]]) - + helpers.wait() + screen:expect_unchanged() end) end) diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index 914256224f..738466ae2b 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -7,6 +7,7 @@ local funcs = helpers.funcs local eq = helpers.eq local eval = helpers.eval local retry = helpers.retry +local nvim_dir = helpers.nvim_dir describe("'wildmenu'", function() local screen @@ -83,13 +84,8 @@ describe("'wildmenu'", function() it('is preserved during :terminal activity', function() command('set wildmenu wildmode=full') command('set scrollback=4') - if iswin() then - 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([[:terminal "]]..nvim_dir..[[/shell-test" REP 5000 !terminal_output!<cr>]]) + feed('G') -- Follow :terminal output. feed([[:sign <Tab>]]) -- Invoke wildmenu. -- NB: in earlier versions terminal output was redrawn during cmdline mode. -- For now just assert that the screen remains unchanged. @@ -114,13 +110,7 @@ describe("'wildmenu'", function() -- Exiting cmdline should show the buffer. feed([[<C-\><C-N>]]) - screen:expect([[ - ^foo | - foo | - foo | - foo | - | - ]]) + screen:expect{any=[[!terminal_output!]]} end) it('ignores :redrawstatus called from a timer #7108', function() |