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
This commit is contained in:
zeertzjq
2023-12-09 20:42:00 +08:00
parent 5e43630a26
commit 1037ce2e46
127 changed files with 3495 additions and 15660 deletions

View File

@@ -74,21 +74,13 @@ describe(':confirm command dialog', function()
feed(':confirm qall\n')
screen:expect([[
bar2 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{2:Xbar [+] }|
foo2 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:Xfoo [+] }|
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
:confirm qall |
{3:Save changes to "Xbar"?} |
@@ -112,21 +104,13 @@ describe(':confirm command dialog', function()
feed(':confirm qall\n')
screen:expect([[
bar3 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{2:Xbar [+] }|
foo3 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:Xfoo [+] }|
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
:confirm qall |
{3:Save changes to "Xbar"?} |
@@ -150,21 +134,13 @@ describe(':confirm command dialog', function()
feed(':confirm qall\n')
screen:expect([[
bar4 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{2:Xbar [+] }|
foo4 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:Xfoo [+] }|
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
:confirm qall |
{3:Save changes to "Xbar"?} |
@@ -173,17 +149,10 @@ describe(':confirm command dialog', function()
feed('N')
screen:expect([[
bar4 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
{2:Xbar [+] }|
foo4 |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*4
{2:Xfoo [+] }|
|
{1: }|
@@ -215,9 +184,7 @@ describe(':confirm command dialog', function()
feed(':confirm close\n')
screen:expect([[
abc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:[No Name] [+] }|
|
{1: }|
@@ -228,22 +195,17 @@ describe(':confirm command dialog', function()
feed('C')
screen:expect([[
^abc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:[No Name] [+] }|
|
{0:~ }|
{0:~ }|
{0:~ }|*2
{2:[No Name] }|
|
]])
feed(':confirm close\n')
screen:expect([[
abc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1:[No Name] [+] }|
|
{1: }|
@@ -254,14 +216,7 @@ describe(':confirm command dialog', function()
feed('N')
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*8
|
]])
end)
@@ -280,9 +235,7 @@ describe(':confirm command dialog', function()
feed(':confirm q\n')
screen:expect([[
foo |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1: }|
:confirm q |
{3:Save changes to "Untitled"?} |
@@ -291,12 +244,7 @@ describe(':confirm command dialog', function()
feed('C')
screen:expect([[
^abc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
|
]])
@@ -304,9 +252,7 @@ describe(':confirm command dialog', function()
feed(':confirm wq\n')
screen:expect([[
foo |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*3
{1: }|
"Xfoo" [noeol] 1L, 3B written |
{3:Save changes to "Untitled"?} |
@@ -315,12 +261,7 @@ describe(':confirm command dialog', function()
feed('C')
screen:expect([[
^abc |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*6
"Xfoo" [noeol] 1L, 3B written |
]])
@@ -343,8 +284,7 @@ describe(':confirm command dialog', function()
feed(':set ro | confirm w\n')
screen:expect([[
foobar |
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
:set ro | confirm w |
{3:'readonly' option is set for "Xconfirm_write_ro".} |
@@ -354,11 +294,7 @@ describe(':confirm command dialog', function()
feed('N')
screen:expect([[
fooba^r |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|*5
|
1,6 All |
]])
@@ -367,8 +303,7 @@ describe(':confirm command dialog', function()
feed(':confirm w\n')
screen:expect([[
foobar |
{0:~ }|
{0:~ }|
{0:~ }|*2
{1: }|
:confirm w |
{3:'readonly' option is set for "Xconfirm_write_ro".} |
@@ -473,8 +408,7 @@ describe(':confirm command dialog', function()
b |
c |
d |
{0:~ }|
{0:~ }|
{0:~ }|*2
|
1,1 All |
]])