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/vimscript/timer_spec.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'test/functional/vimscript/timer_spec.lua') diff --git a/test/functional/vimscript/timer_spec.lua b/test/functional/vimscript/timer_spec.lua index 1818a71ea2..a58cd6ae7f 100644 --- a/test/functional/vimscript/timer_spec.lua +++ b/test/functional/vimscript/timer_spec.lua @@ -251,15 +251,7 @@ describe('timers', function() :good^ | ]]) command('let g:val = 1') - - screen:expect{grid=[[ - | - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| - :good^ | - ]], intermediate=true, timeout=load_adjust(200)} + screen:expect_unchanged(true, load_adjust(200)) eq(2, eval('g:val')) end) -- cgit