test(tui_spec): fix flaky test for isolated "stop paste" (#28053)

In rare cases there may be multiple chunks of phase 2 because of timing.
This commit is contained in:
zeertzjq
2024-03-27 11:22:20 +08:00
committed by GitHub
parent bf7c7adb40
commit 00e9c69551

View File

@@ -1485,7 +1485,8 @@ describe('TUI', function()
feed_data('\027[201~') -- phase 3 feed_data('\027[201~') -- phase 3
screen:expect_unchanged() screen:expect_unchanged()
local _, rv = child_session:request('nvim_exec_lua', [[return _G.paste_phases]], {}) local _, rv = child_session:request('nvim_exec_lua', [[return _G.paste_phases]], {})
eq({ 1, 2, 3 }, rv) -- In rare cases there may be multiple chunks of phase 2 because of timing.
eq({ 1, 2, 3 }, { rv[1], rv[2], rv[#rv] })
end) end)
it('allows termguicolors to be set at runtime', function() it('allows termguicolors to be set at runtime', function()