From 1037ce2e461034a20e35ad59969fd05d5ad68b91 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 9 Dec 2023 20:42:00 +0800 Subject: test: avoid repeated screen lines in expected states This is the command invoked repeatedly to make the changes: :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g --- test/functional/vimscript/timer_spec.lua | 15 ++++----------- 1 file changed, 4 insertions(+), 11 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 a58cd6ae7f..93d88f6338 100644 --- a/test/functional/vimscript/timer_spec.lua +++ b/test/functional/vimscript/timer_spec.lua @@ -133,9 +133,7 @@ describe('timers', function() screen:expect([[ ^ITEM 1 | ITEM 2 | - {1:~ }| - {1:~ }| - {1:~ }| + {1:~ }|*3 | ]]) nvim_async("command", "let g:cont = 1") @@ -144,8 +142,7 @@ describe('timers', function() ^ITEM 1 | ITEM 2 | ITEM 3 | - {1:~ }| - {1:~ }| + {1:~ }|*2 | ]]) @@ -155,8 +152,7 @@ describe('timers', function() ^ITEM 1 | ITEM 2 | ITEM 3 | - {1:~ }| - {1:~ }| + {1:~ }|*2 | ]], unchanged=true} end) @@ -244,10 +240,7 @@ describe('timers', function() feed(":good") screen:expect([[ | - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| + {0:~ }|*4 :good^ | ]]) command('let g:val = 1') -- cgit