mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 14:26:07 +00:00
test(swapfile_preserve_recover_spec): fix flaky test (#35782)
Invoke nvim_get_mode() to ensure that pending input is processed.
(cherry picked from commit 1bafba31f6
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
693772100e
commit
777551c599
@@ -191,7 +191,9 @@ pcall(vim.cmd.edit, 'Xtest_swapredraw.lua')
|
|||||||
exec(init)
|
exec(init)
|
||||||
command('autocmd! nvim.swapfile') -- Delete the default handler (which skips the dialog).
|
command('autocmd! nvim.swapfile') -- Delete the default handler (which skips the dialog).
|
||||||
feed(':edit ' .. testfile .. '<CR>')
|
feed(':edit ' .. testfile .. '<CR>')
|
||||||
|
eq('r?', api.nvim_get_mode().mode)
|
||||||
feed('E:source<CR>')
|
feed('E:source<CR>')
|
||||||
|
eq('r?', api.nvim_get_mode().mode)
|
||||||
screen2:sleep(1000)
|
screen2:sleep(1000)
|
||||||
feed('E')
|
feed('E')
|
||||||
screen2:expect([[
|
screen2:expect([[
|
||||||
|
Reference in New Issue
Block a user