aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-10-19 23:14:55 +0200
committerGitHub <noreply@github.com>2020-10-19 23:14:55 +0200
commit38efa1730f205bc2cd0da40b1fac8936eec1a835 (patch)
tree7bdf7a2d1cb9752ce9c36aecbcbfb6469fe930bb /test/functional/ui
parenteaee3d9297d114c81b05dd4ed104373eeb87bc11 (diff)
parent07cc231142f5810c70818007dcd720271b1c0248 (diff)
downloadrneovim-38efa1730f205bc2cd0da40b1fac8936eec1a835.tar.gz
rneovim-38efa1730f205bc2cd0da40b1fac8936eec1a835.tar.bz2
rneovim-38efa1730f205bc2cd0da40b1fac8936eec1a835.zip
Merge pull request #13118 from bfredl/mudholland
A Mudholland Dr. Recast
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/inccommand_spec.lua36
-rw-r--r--test/functional/ui/mouse_spec.lua2
-rw-r--r--test/functional/ui/multigrid_spec.lua8
-rw-r--r--test/functional/ui/searchhl_spec.lua2
4 files changed, 24 insertions, 24 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua
index 16c5477ee4..712c1f377a 100644
--- a/test/functional/ui/inccommand_spec.lua
+++ b/test/functional/ui/inccommand_spec.lua
@@ -14,7 +14,7 @@ local neq = helpers.neq
local ok = helpers.ok
local retry = helpers.retry
local source = helpers.source
-local wait = helpers.wait
+local poke_eventloop = helpers.poke_eventloop
local nvim = helpers.nvim
local sleep = helpers.sleep
local nvim_dir = helpers.nvim_dir
@@ -114,7 +114,7 @@ describe(":substitute, inccommand=split interactivity", function()
it("no preview if invoked by a script", function()
source('%s/tw/MO/g')
- wait()
+ poke_eventloop()
eq(1, eval("bufnr('$')"))
-- sanity check: assert the buffer state
expect(default_text:gsub("tw", "MO"))
@@ -123,10 +123,10 @@ describe(":substitute, inccommand=split interactivity", function()
it("no preview if invoked by feedkeys()", function()
-- in a script...
source([[:call feedkeys(":%s/tw/MO/g\<CR>")]])
- wait()
+ poke_eventloop()
-- or interactively...
feed([[:call feedkeys(":%s/tw/MO/g\<CR>")<CR>]])
- wait()
+ poke_eventloop()
eq(1, eval("bufnr('$')"))
-- sanity check: assert the buffer state
expect(default_text:gsub("tw", "MO"))
@@ -194,7 +194,7 @@ describe(":substitute, 'inccommand' preserves", function()
-- Start typing an incomplete :substitute command.
feed([[:%s/e/YYYY/g]])
- wait()
+ poke_eventloop()
-- Cancel the :substitute.
feed([[<C-\><C-N>]])
@@ -230,7 +230,7 @@ describe(":substitute, 'inccommand' preserves", function()
-- Start typing an incomplete :substitute command.
feed([[:%s/e/YYYY/g]])
- wait()
+ poke_eventloop()
-- Cancel the :substitute.
feed([[<C-\><C-N>]])
@@ -251,7 +251,7 @@ describe(":substitute, 'inccommand' preserves", function()
some text 1
some text 2]])
feed(":%s/e/XXX/")
- wait()
+ poke_eventloop()
eq(expected_tick, eval("b:changedtick"))
end)
@@ -1128,15 +1128,15 @@ describe(":substitute, inccommand=split", function()
feed(":%s/tw/Xo/g")
-- Delete and re-type the g a few times.
feed("<BS>")
- wait()
+ poke_eventloop()
feed("g")
- wait()
+ poke_eventloop()
feed("<BS>")
- wait()
+ poke_eventloop()
feed("g")
- wait()
+ poke_eventloop()
feed("<CR>")
- wait()
+ poke_eventloop()
feed(":vs tmp<enter>")
eq(3, helpers.call('bufnr', '$'))
end)
@@ -1171,7 +1171,7 @@ describe(":substitute, inccommand=split", function()
feed_command("silent edit! test/functional/fixtures/bigfile_oneline.txt")
-- Start :substitute with a slow pattern.
feed([[:%s/B.*N/x]])
- wait()
+ poke_eventloop()
-- Assert that 'inccommand' is DISABLED in cmdline mode.
eq("", eval("&inccommand"))
@@ -1360,7 +1360,7 @@ describe("inccommand=nosplit", function()
feed("<Esc>")
command("set icm=nosplit")
feed(":%s/tw/OKOK")
- wait()
+ poke_eventloop()
screen:expect([[
Inc substitution on |
{12:OKOK}o lines |
@@ -2592,7 +2592,7 @@ describe(":substitute", function()
feed("<C-c>")
feed('gg')
- wait()
+ poke_eventloop()
feed([[:%s/\(some\)\@<lt>!thing/one/]])
screen:expect([[
something |
@@ -2613,7 +2613,7 @@ describe(":substitute", function()
]])
feed([[<C-c>]])
- wait()
+ poke_eventloop()
feed([[:%s/some\(thing\)\@=/every/]])
screen:expect([[
{12:every}thing |
@@ -2634,7 +2634,7 @@ describe(":substitute", function()
]])
feed([[<C-c>]])
- wait()
+ poke_eventloop()
feed([[:%s/some\(thing\)\@!/every/]])
screen:expect([[
something |
@@ -2718,7 +2718,7 @@ it(':substitute with inccommand during :terminal activity', function()
feed('gg')
feed(':%s/foo/ZZZ')
sleep(20) -- Allow some terminal activity.
- helpers.wait()
+ helpers.poke_eventloop()
screen:expect_unchanged()
end)
end)
diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua
index d857b57a31..a741136111 100644
--- a/test/functional/ui/mouse_spec.lua
+++ b/test/functional/ui/mouse_spec.lua
@@ -546,7 +546,7 @@ describe('ui/mouse/input', function()
:tabprevious |
]])
feed('<LeftMouse><10,0><LeftRelease>') -- go to second tab
- helpers.wait()
+ helpers.poke_eventloop()
feed('<LeftMouse><0,1>')
screen:expect([[
{tab: + foo }{sel: + bar }{fill: }{tab:X}|
diff --git a/test/functional/ui/multigrid_spec.lua b/test/functional/ui/multigrid_spec.lua
index e4d1187dea..6601c2d68e 100644
--- a/test/functional/ui/multigrid_spec.lua
+++ b/test/functional/ui/multigrid_spec.lua
@@ -4,7 +4,7 @@ local clear = helpers.clear
local feed, command, insert = helpers.feed, helpers.command, helpers.insert
local eq = helpers.eq
local meths = helpers.meths
-local wait = helpers.wait
+local poke_eventloop = helpers.poke_eventloop
describe('ext_multigrid', function()
@@ -1846,8 +1846,8 @@ describe('ext_multigrid', function()
meths.input_mouse('left', 'press', '', 1,6, 20)
-- TODO(bfredl): "batching" input_mouse is formally not supported yet.
-- Normally it should work fine in async context when nvim is not blocked,
- -- but add a wait be sure.
- wait()
+ -- but add a poke_eventloop be sure.
+ poke_eventloop()
meths.input_mouse('left', 'drag', '', 1, 4, 20)
screen:expect{grid=[[
## grid 1
@@ -1921,7 +1921,7 @@ describe('ext_multigrid', function()
]]}
meths.input_mouse('left', 'press', '', 1,8, 26)
- wait()
+ poke_eventloop()
meths.input_mouse('left', 'drag', '', 1, 6, 30)
screen:expect{grid=[[
## grid 1
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua
index 635ce7392b..222275eb4d 100644
--- a/test/functional/ui/searchhl_spec.lua
+++ b/test/functional/ui/searchhl_spec.lua
@@ -158,7 +158,7 @@ describe('search highlighting', function()
bar foo baz
]])
feed('/foo')
- helpers.wait()
+ helpers.poke_eventloop()
screen:expect_unchanged()
end)