diff options
Diffstat (limited to 'test/functional/ui')
| -rw-r--r-- | test/functional/ui/float_spec.lua | 2 | ||||
| -rw-r--r-- | test/functional/ui/inccommand_spec.lua | 36 | ||||
| -rw-r--r-- | test/functional/ui/mouse_spec.lua | 2 | ||||
| -rw-r--r-- | test/functional/ui/multigrid_spec.lua | 8 | ||||
| -rw-r--r-- | test/functional/ui/popupmenu_spec.lua | 44 | ||||
| -rw-r--r-- | test/functional/ui/searchhl_spec.lua | 2 |
6 files changed, 47 insertions, 47 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index 11fe861de8..eec8eb93d4 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -59,7 +59,7 @@ describe('floatwin', function() end) it('closed immediately by autocmd #11383', function() - eq('Error executing lua: [string "<nvim>"]:4: Window was closed immediately', + eq('Error executing lua: [string "<nvim>"]:0: Window was closed immediately', pcall_err(exec_lua, [[ local a = vim.api local function crashes(contents) 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/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index c1c5d1ce2e..3f984ff943 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -1213,10 +1213,10 @@ describe('builtin popupmenu', function() funcs.complete(29, {'word', 'choice', 'text', 'thing'}) screen:expect([[ some long prefix before the ^ | - {n:word }{1: }| - {n:choice }{1: }| - {n:text }{1: }| - {n:thing }{1: }| + {1:~ }{n: word }| + {1:~ }{n: choice}| + {1:~ }{n: text }| + {1:~ }{n: thing }| {1:~ }| {1:~ }| {1:~ }| @@ -1261,10 +1261,10 @@ describe('builtin popupmenu', function() feed('<c-p>') screen:expect([[ some long prefix before the text| - {n:^word }{1: }| - {n:choice }{1: }| - {s:text }{1: }| - {n:thing }{1: }| + {1:^~ }{n: word }| + {1:~ }{n: choice}| + {1:~ }{s: text }| + {1:~ }{n: thing }| {1:~ }| {1:~ }| {1:~ }| @@ -1341,10 +1341,10 @@ describe('builtin popupmenu', function() screen:expect([[ some long prefix | before the text^ | - {1:~ }{n: word }| - {1:~ }{n: choice }| - {1:~ }{s: text }| - {1:~ }{n: thing }| + {1:~ }{n: word }{1: }| + {1:~ }{n: choice }{1: }| + {1:~ }{s: text }{1: }| + {1:~ }{n: thing }{1: }| {1:~ }| {2:-- INSERT --} | ]]) @@ -1358,10 +1358,10 @@ describe('builtin popupmenu', function() funcs.complete(29, {'word', 'choice', 'text', 'thing'}) screen:expect([[ some long prefix before the ^ | - {n:word }{1: }| - {n:choice }{1: }| - {n:text }{1: }| - {n:thing }{1: }| + {1:~ }{n: word }| + {1:~ }{n: choice}| + {1:~ }{n: text }| + {1:~ }{n: thing }| {1:~ }| {1:~ }| {1:~ }| @@ -2168,8 +2168,8 @@ describe('builtin popupmenu', function() funcs.complete(29, {'word', 'choice', 'text', 'thing'}) screen:expect([[ some long prefix before the ^ | - {n:word }{c: }{1: }| - {n:choice }{s: }{1: }| + {1:~ }{n: word }{c: }| + {1:~ }{n: choice}{s: }| {1:~ }| {1:~ }| {1:~ }| @@ -2187,10 +2187,10 @@ describe('builtin popupmenu', function() funcs.complete(29, {'word', 'choice', 'text', 'thing'}) screen:expect([[ some long prefix before the ^ | - {n:word }{1: }| - {n:choice }{1: }| - {n:text }{1: }| - {n:thing }{1: }| + {1:~ }{n: word }| + {1:~ }{n: choice}| + {1:~ }{n: text }| + {1:~ }{n: thing }| {1:~ }| {1:~ }| {2:-- INSERT --} | 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) |