From eec979ca8160ae4230b63d406b2dae4d3e17d500 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 21 Jan 2023 18:15:38 +0800 Subject: test(tui_spec): don't expect exact screen in rapid resize test (#21935) There may be a race between resizes, so don't expect exact screen. Expect window width instead. --- test/functional/terminal/tui_spec.lua | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'test/functional') diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index c4717ae7ee..35dc22ae80 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -102,25 +102,9 @@ describe('TUI', function() command('call jobresize(b:terminal_job_id, 1, 4)') screen:try_resize(57, 17) command('call jobresize(b:terminal_job_id, 57, 17)') - screen:expect([[ - {1:0}000;;Cc;0;BN;;;;;N;NULL;;;; | - 0001;;Cc;0;BN;;;;;N;START OF HEADING;;;; | - 0002;;Cc;0;BN;;;;;N;START OF TEXT;;;; | - 0003;;Cc;0;BN;;;;;N;END OF TEXT;;;; | - 0004;;Cc;0;BN;;;;;N;END OF TRANSMISSION;;;; | - 0005;;Cc;0;BN;;;;;N;ENQUIRY;;;; | - 0006;;Cc;0;BN;;;;;N;ACKNOWLEDGE;;;; | - 0007;;Cc;0;BN;;;;;N;BELL;;;; | - 0008;;Cc;0;BN;;;;;N;BACKSPACE;;;; | - 0009;;Cc;0;S;;;;;N;CHARACTER TABULATION;;;; | - 000A;;Cc;0;B;;;;;N;LINE FEED (LF);;;; | - 000B;;Cc;0;S;;;;;N;LINE TABULATION;;;; | - 000C;;Cc;0;WS;;;;;N;FORM FEED (FF);;;; | - 000D;;Cc;0;B;;;;;N;CARRIAGE RETURN (CR);;;; | - {5:test/functional/fixtures/bigfile.txt }| - | - {3:-- TERMINAL --} | - ]]) + retry(nil, nil, function() + eq({true, 57}, {child_session:request('nvim_win_get_width', 0)}) + end) end) it('accepts resize while pager is active', function() -- cgit