aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/cursor_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-07-23 12:46:56 +0800
committerGitHub <noreply@github.com>2023-07-23 12:46:56 +0800
commitce56ad2ba7c93c5053b657cd99642b375a944607 (patch)
tree3d077ead2b71c8f64ec2c9fee56541aa27d09d98 /test/functional/terminal/cursor_spec.lua
parentf56c1848091bb64c63b5bc25ec74bcbd2f52bdde (diff)
downloadrneovim-ce56ad2ba7c93c5053b657cd99642b375a944607.tar.gz
rneovim-ce56ad2ba7c93c5053b657cd99642b375a944607.tar.bz2
rneovim-ce56ad2ba7c93c5053b657cd99642b375a944607.zip
test: reduce flakiness (#24443)
Avoid consecutive RPC requests involving :startinsert or :stopinsert, because consecutive RPC requests may be processed together, before the :startinsert or :stopinsert takes effect. Also change some feed_command() to command() to make tests faster.
Diffstat (limited to 'test/functional/terminal/cursor_spec.lua')
-rw-r--r--test/functional/terminal/cursor_spec.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/terminal/cursor_spec.lua b/test/functional/terminal/cursor_spec.lua
index 47bc02373c..8285bcc26e 100644
--- a/test/functional/terminal/cursor_spec.lua
+++ b/test/functional/terminal/cursor_spec.lua
@@ -6,7 +6,7 @@ local testprg, command = helpers.testprg, helpers.command
local nvim_prog = helpers.nvim_prog
local eq, eval = helpers.eq, helpers.eval
local matches = helpers.matches
-local feed_command = helpers.feed_command
+local poke_eventloop = helpers.poke_eventloop
local hide_cursor = thelpers.hide_cursor
local show_cursor = thelpers.show_cursor
local is_os = helpers.is_os
@@ -153,7 +153,8 @@ describe('cursor with customized highlighting', function()
})
screen:attach({rgb=false})
command('call termopen(["'..testprg('tty-test')..'"])')
- feed_command('startinsert')
+ feed('i')
+ poke_eventloop()
end)
it('overrides the default highlighting', function()