From 05faa8f30ad770d4e4ead41cec601ccced8fb97f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 15 Feb 2023 07:26:55 +0800 Subject: test: make expect_unchanged() less confusing (#22255) Problem: The sleep before collecting the initial screen state is confusing and may lead to unexpected success if it comes after a blocking RPC call. Solution: Remove that sleep and add an "intermediate" argument. --- test/functional/lua/ui_event_spec.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'test/functional/lua/ui_event_spec.lua') diff --git a/test/functional/lua/ui_event_spec.lua b/test/functional/lua/ui_event_spec.lua index 6481da900e..de436771f9 100644 --- a/test/functional/lua/ui_event_spec.lua +++ b/test/functional/lua/ui_event_spec.lua @@ -77,13 +77,8 @@ describe('vim.ui_attach', function() } feed '' - screen:expect{grid=[[ - foobar^ | - {1:~ }| - {1:~ }| - {1:~ }| - {2:-- INSERT --} | - ]], intermediate=true} + -- There is an intermediate state where the 'showmode' message disappears. + screen:expect_unchanged(true) expect_events { { "popupmenu_hide" }; } -- cgit From bf70a33f5e7de0218704126c149db24542e39766 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 14 Oct 2023 09:58:30 +0800 Subject: vim-patch:8.1.0822: peeking and flushing output slows down execution (#25629) Problem: Peeking and flushing output slows down execution. Solution: Do not update the mode message when global_busy is set. Do not flush when only peeking for a character. (Ken Takata) https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c --- test/functional/lua/ui_event_spec.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/functional/lua/ui_event_spec.lua') diff --git a/test/functional/lua/ui_event_spec.lua b/test/functional/lua/ui_event_spec.lua index de436771f9..373d45da61 100644 --- a/test/functional/lua/ui_event_spec.lua +++ b/test/functional/lua/ui_event_spec.lua @@ -77,8 +77,7 @@ describe('vim.ui_attach', function() } feed '' - -- There is an intermediate state where the 'showmode' message disappears. - screen:expect_unchanged(true) + screen:expect_unchanged() expect_events { { "popupmenu_hide" }; } -- cgit