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/legacy/digraph_spec.lua | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'test/functional/legacy/digraph_spec.lua') diff --git a/test/functional/legacy/digraph_spec.lua b/test/functional/legacy/digraph_spec.lua index 7eeb83eb5f..a0399847bd 100644 --- a/test/functional/legacy/digraph_spec.lua +++ b/test/functional/legacy/digraph_spec.lua @@ -18,28 +18,19 @@ describe('digraph', function() feed('i') screen:expect([[ {1:^?} | - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| + {0:~ }|*4 {2:-- INSERT --}| ]]) feed('1') screen:expect([[ {1:^1} | - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| + {0:~ }|*4 {2:-- INSERT --}| ]]) feed('2') screen:expect([[ ½^ | - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| + {0:~ }|*4 {2:-- INSERT --}| ]]) end) -- cgit From 04f2f864e270e772c6326cefdf24947f0130e492 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 3 Jan 2024 02:09:18 +0100 Subject: refactor: format test/* --- test/functional/legacy/digraph_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/legacy/digraph_spec.lua') diff --git a/test/functional/legacy/digraph_spec.lua b/test/functional/legacy/digraph_spec.lua index a0399847bd..015f144b74 100644 --- a/test/functional/legacy/digraph_spec.lua +++ b/test/functional/legacy/digraph_spec.lua @@ -10,9 +10,9 @@ describe('digraph', function() it('characters displayed on the screen', function() local screen = Screen.new(10, 6) screen:set_default_attr_ids({ - [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText - [1] = {foreground = Screen.colors.Blue}, -- SpecialKey - [2] = {bold = true}, -- ModeMsg + [0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText + [1] = { foreground = Screen.colors.Blue }, -- SpecialKey + [2] = { bold = true }, -- ModeMsg }) screen:attach() feed('i') -- cgit