mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +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:
@@ -48,9 +48,7 @@ describe('vim.secure', function()
|
||||
feed_command([[lua vim.secure.read('Xfile')]])
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|*3
|
||||
{2: }|
|
||||
:lua vim.secure.read('Xfile') |
|
||||
{3:]] .. cwd .. pathsep .. [[Xfile is not trusted.}{MATCH:%s+}|
|
||||
@@ -59,12 +57,7 @@ describe('vim.secure', function()
|
||||
feed('d')
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|*6
|
||||
|
|
||||
]]}
|
||||
|
||||
@@ -77,9 +70,7 @@ describe('vim.secure', function()
|
||||
feed_command([[lua vim.secure.read('Xfile')]])
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|*3
|
||||
{2: }|
|
||||
:lua vim.secure.read('Xfile') |
|
||||
{3:]] .. cwd .. pathsep .. [[Xfile is not trusted.}{MATCH:%s+}|
|
||||
@@ -88,12 +79,7 @@ describe('vim.secure', function()
|
||||
feed('a')
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|*6
|
||||
|
|
||||
]]}
|
||||
|
||||
@@ -107,9 +93,7 @@ describe('vim.secure', function()
|
||||
feed_command([[lua vim.secure.read('Xfile')]])
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|*3
|
||||
{2: }|
|
||||
:lua vim.secure.read('Xfile') |
|
||||
{3:]] .. cwd .. pathsep .. [[Xfile is not trusted.}{MATCH:%s+}|
|
||||
@@ -118,12 +102,7 @@ describe('vim.secure', function()
|
||||
feed('i')
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|*6
|
||||
|
|
||||
]]}
|
||||
|
||||
@@ -134,9 +113,7 @@ describe('vim.secure', function()
|
||||
feed_command([[lua vim.secure.read('Xfile')]])
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|*3
|
||||
{2: }|
|
||||
:lua vim.secure.read('Xfile') |
|
||||
{3:]] .. cwd .. pathsep .. [[Xfile is not trusted.}{MATCH:%s+}|
|
||||
@@ -145,8 +122,7 @@ describe('vim.secure', function()
|
||||
feed('v')
|
||||
screen:expect{grid=[[
|
||||
^let g:foobar = 42 |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|*2
|
||||
{2:]] .. funcs.fnamemodify(cwd, ':~') .. pathsep .. [[Xfile [RO]{MATCH:%s+}}|
|
||||
|
|
||||
{1:~ }|
|
||||
|
Reference in New Issue
Block a user