mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
test: fix VimResume test flakiness (#24438)
This commit is contained in:
parent
f0d618667a
commit
f56c184809
@ -92,46 +92,32 @@ it('autocmds VimSuspend/VimResume #22041', function()
|
||||
|
||||
eq(false, screen.suspended)
|
||||
feed('<C-Z>')
|
||||
screen:expect(function() eq (true, screen.suspended) end)
|
||||
screen:expect(function() eq(true, screen.suspended) end)
|
||||
eq({ 's' }, eval('g:ev'))
|
||||
screen.suspended = false
|
||||
feed('<Ignore>')
|
||||
eq({ 's', 'r' }, eval('g:ev'))
|
||||
|
||||
command('suspend')
|
||||
screen:expect(function() eq (true, screen.suspended) end)
|
||||
screen:expect(function() eq(true, screen.suspended) end)
|
||||
eq({ 's', 'r', 's' }, eval('g:ev'))
|
||||
screen.suspended = false
|
||||
meths.input_mouse('move', '', '', 0, 0, 0)
|
||||
eq({ 's', 'r', 's', 'r' }, eval('g:ev'))
|
||||
|
||||
feed('<C-Z>')
|
||||
screen:expect(function() eq (true, screen.suspended) end)
|
||||
feed('<C-Z><C-Z><C-Z>')
|
||||
screen:expect(function() eq(true, screen.suspended) end)
|
||||
meths.ui_set_focus(false)
|
||||
eq({ 's', 'r', 's', 'r', 's' }, eval('g:ev'))
|
||||
screen.suspended = false
|
||||
meths.ui_set_focus(true)
|
||||
eq({ 's', 'r', 's', 'r', 's', 'r' }, eval('g:ev'))
|
||||
|
||||
command('suspend')
|
||||
screen:expect(function() eq (true, screen.suspended) end)
|
||||
command('suspend | suspend | suspend')
|
||||
screen:expect(function() eq(true, screen.suspended) end)
|
||||
screen:detach()
|
||||
eq({ 's', 'r', 's', 'r', 's', 'r', 's' }, eval('g:ev'))
|
||||
screen.suspended = false
|
||||
screen:attach()
|
||||
eq({ 's', 'r', 's', 'r', 's', 'r', 's', 'r' }, eval('g:ev'))
|
||||
|
||||
eq(false, screen.suspended)
|
||||
feed('<C-Z><C-Z><C-Z><C-Z>')
|
||||
screen:expect(function() eq (true, screen.suspended) end)
|
||||
eq({ 's', 'r', 's', 'r', 's', 'r', 's', 'r', 's' }, eval('g:ev'))
|
||||
screen.suspended = false
|
||||
feed('<C-Z><C-Z><C-Z><C-Z>')
|
||||
eq({ 's', 'r', 's', 'r', 's', 'r', 's', 'r', 's', 'r', 's' }, eval('g:ev'))
|
||||
screen:expect(function() eq (true, screen.suspended) end)
|
||||
screen.suspended = false
|
||||
feed('i<C-R>=g:ev<CR>')
|
||||
eq({ 's', 'r', 's', 'r', 's', 'r', 's', 'r', 's', 'r', 's', 'r' }, eval('g:ev'))
|
||||
eq({ 's', 'r', 's', 'r', 's', 'r', 's', 'r', 's', 'r', 's', 'r', '' },
|
||||
meths.buf_get_lines(0, 0, -1, true))
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user