mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
test/win: retry unreliable SIGWINCH test
This commit is contained in:
@@ -7,6 +7,7 @@ local command = helpers.command
|
|||||||
local eq = helpers.eq
|
local eq = helpers.eq
|
||||||
local eval = helpers.eval
|
local eval = helpers.eval
|
||||||
local iswin = helpers.iswin
|
local iswin = helpers.iswin
|
||||||
|
local retry = helpers.retry
|
||||||
|
|
||||||
describe('terminal', function()
|
describe('terminal', function()
|
||||||
local screen
|
local screen
|
||||||
@@ -68,16 +69,19 @@ describe('terminal', function()
|
|||||||
|
|
||||||
it('forwards resize request to the program', function()
|
it('forwards resize request to the program', function()
|
||||||
feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom.
|
feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom.
|
||||||
screen:try_resize(screen._width - 3, screen._height - 2)
|
|
||||||
|
|
||||||
if iswin() then
|
if iswin() then
|
||||||
-- win: less-precise test, SIGWINCH is noisy there. #7506
|
retry(3, nil, function()
|
||||||
|
-- win: SIGWINCH is unreliable. #7506
|
||||||
|
screen:try_resize(screen._width - 3, screen._height - 2)
|
||||||
screen:expect{any='rows: 7, cols: 47'}
|
screen:expect{any='rows: 7, cols: 47'}
|
||||||
screen:try_resize(screen._width - 6, screen._height - 3)
|
screen:try_resize(screen._width - 6, screen._height - 3)
|
||||||
screen:expect{any='rows: 4, cols: 41'}
|
screen:expect{any='rows: 4, cols: 41'}
|
||||||
|
end)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
screen:try_resize(screen._width - 3, screen._height - 2)
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
tty ready |
|
tty ready |
|
||||||
rows: 7, cols: 47 |
|
rows: 7, cols: 47 |
|
||||||
|
|||||||
Reference in New Issue
Block a user