aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/execute_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-12-09 20:42:00 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-12-09 22:15:02 +0800
commit1037ce2e461034a20e35ad59969fd05d5ad68b91 (patch)
tree5cc490afac4607008bacf24d132015b63adfd1d0 /test/functional/vimscript/execute_spec.lua
parent5e43630a260e49ed494539d41cb832b1ee6d03c8 (diff)
downloadrneovim-1037ce2e461034a20e35ad59969fd05d5ad68b91.tar.gz
rneovim-1037ce2e461034a20e35ad59969fd05d5ad68b91.tar.bz2
rneovim-1037ce2e461034a20e35ad59969fd05d5ad68b91.zip
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
Diffstat (limited to 'test/functional/vimscript/execute_spec.lua')
-rw-r--r--test/functional/vimscript/execute_spec.lua35
1 files changed, 8 insertions, 27 deletions
diff --git a/test/functional/vimscript/execute_spec.lua b/test/functional/vimscript/execute_spec.lua
index bb28938708..de5c32fb6c 100644
--- a/test/functional/vimscript/execute_spec.lua
+++ b/test/functional/vimscript/execute_spec.lua
@@ -114,8 +114,7 @@ describe('execute()', function()
feed(':echo execute("hi ErrorMsg")<CR>')
screen:expect([[
|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*2
{2: }|
|
ErrorMsg xxx ctermfg=15 ctermbg=1 guifg=White guibg=Red |
@@ -187,30 +186,21 @@ describe('execute()', function()
feed([[:call Test1()<cr>]])
screen:expect([[
^ |
- ~ |
- ~ |
- ~ |
- ~ |
+ ~ |*4
ABCD |
]])
feed([[:call Test2()<cr>]])
screen:expect([[
^ |
- ~ |
- ~ |
- ~ |
- ~ |
+ ~ |*4
1234ABCD |
]])
feed([[:call Test3()<cr>]])
screen:expect([[
^ |
- ~ |
- ~ |
- ~ |
- ~ |
+ ~ |*4
1234ABCDXZYZ |
]])
@@ -231,10 +221,7 @@ describe('execute()', function()
feed([[:call Test5()<cr>]])
screen:expect([[
^ |
- ~ |
- ~ |
- ~ |
- ~ |
+ ~ |*4
1234ABCD |
]])
@@ -273,9 +260,7 @@ describe('execute()', function()
command('let g:mes = execute("echon 42", "")')
screen:expect([[
^ |
- ~ |
- ~ |
- ~ |
+ ~ |*3
42 |
]])
eq('42', eval('g:mes'))
@@ -295,9 +280,7 @@ describe('execute()', function()
command('let g:mes = execute("echon 42")')
screen:expect([[
^ |
- ~ |
- ~ |
- ~ |
+ ~ |*3
|
]])
eq('42', eval('g:mes'))
@@ -305,9 +288,7 @@ describe('execute()', function()
command('let g:mes = execute("echon 13", "silent")')
screen:expect{grid=[[
^ |
- ~ |
- ~ |
- ~ |
+ ~ |*3
|
]], unchanged=true}
eq('13', eval('g:mes'))