mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user