aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/inccommand_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-01 11:13:29 -0700
committerGitHub <noreply@github.com>2019-09-01 11:13:29 -0700
commit2f37c243482eec20fe52f298368c02eca21c758f (patch)
treee58f19e64682ee8de1de7c514025adc9e747ef4c /test/functional/ui/inccommand_spec.lua
parent78a2bbaa4b0ee6b0e575c4239b7b35eb42852910 (diff)
parent2c1749ce443c3bb15a719c947b186301bc8ef0b3 (diff)
downloadrneovim-2f37c243482eec20fe52f298368c02eca21c758f.tar.gz
rneovim-2f37c243482eec20fe52f298368c02eca21c758f.tar.bz2
rneovim-2f37c243482eec20fe52f298368c02eca21c758f.zip
Merge #10733 from justinmk/test-fixes
test: use shell-test (avoid system shell)
Diffstat (limited to 'test/functional/ui/inccommand_spec.lua')
-rw-r--r--test/functional/ui/inccommand_spec.lua48
1 files changed, 5 insertions, 43 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)