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

@@ -72,12 +72,10 @@ describe('folding', function()
dd {{{ |
ee {{{ }}} |
{{{ |
ff }}} |
ff }}} |
ff }}} |*2
^ |
line 2 foldlevel=2 |
1 |
1 |
1 |*2
|
]])
@@ -227,22 +225,14 @@ describe('folding', function()
screen:expect([[
{3:+ }{4: 0 }{2:^+-- 2 lines: ·························}|
{3:+ }{4: 1 }{2:+-- 2 lines: ·························}|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
feed("j")
screen:expect([[
{3:+ }{4: 1 }{2:+-- 2 lines: ·························}|
{3:+ }{4: 0 }{2:^+-- 2 lines: ·························}|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*5
|
]])
end)
@@ -259,10 +249,7 @@ describe('folding', function()
^one |
{2:+-- 2 lines: two····························}|
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
feed('2G')
@@ -271,9 +258,7 @@ describe('folding', function()
^two |
three |
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
feed('4G')
@@ -281,10 +266,7 @@ describe('folding', function()
one |
{2:+-- 2 lines: two····························}|
^four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
feed('3G')
@@ -293,9 +275,7 @@ describe('folding', function()
two |
^three |
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
feed('1G')
@@ -303,10 +283,7 @@ describe('folding', function()
^one |
{2:+-- 2 lines: two····························}|
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
feed('2G')
@@ -315,9 +292,7 @@ describe('folding', function()
^two |
three |
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*3
|
]])
feed('k')
@@ -325,10 +300,7 @@ describe('folding', function()
^one |
{2:+-- 2 lines: two····························}|
four |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|*4
|
]])
end)