mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test(getchar_spec): fix flakiness (#32320)
Problem: getchar_spec may fail when screen:expect_unchanged() doesn't wait long enough. Solution: Add poke_eventloop() before screen:expect_unchanged().
This commit is contained in:
parent
40edfb0af0
commit
3d22293496
@ -5,6 +5,7 @@ local clear = n.clear
|
||||
local exec = n.exec
|
||||
local feed = n.feed
|
||||
local async_command = n.async_meths.nvim_command
|
||||
local poke_eventloop = n.poke_eventloop
|
||||
|
||||
describe('getchar()', function()
|
||||
before_each(clear)
|
||||
@ -56,8 +57,10 @@ describe('getchar()', function()
|
||||
"echo 1234 | sleep 1m | call getchar(-1, #{cursor: 'keep'})",
|
||||
}) do
|
||||
async_command(cmd)
|
||||
poke_eventloop()
|
||||
screen:expect_unchanged()
|
||||
feed('a')
|
||||
poke_eventloop()
|
||||
screen:expect_unchanged()
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user