aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/overrides_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/lua/overrides_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/lua/overrides_spec.lua')
-rw-r--r--test/functional/lua/overrides_spec.lua88
1 files changed, 11 insertions, 77 deletions
diff --git a/test/functional/lua/overrides_spec.lua b/test/functional/lua/overrides_spec.lua
index c08f3d06a9..f3ea29b8a7 100644
--- a/test/functional/lua/overrides_spec.lua
+++ b/test/functional/lua/overrides_spec.lua
@@ -148,9 +148,7 @@ describe('print', function()
feed([[:lua print('\na')<CR>]])
screen:expect{grid=[[
|
- {0:~ }|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*3
{2: }|
|
a |
@@ -160,8 +158,7 @@ describe('print', function()
feed([[:lua print('b\n\nc')<CR>]])
screen:expect{grid=[[
|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*2
{2: }|
b |
|
@@ -196,16 +193,7 @@ describe('debug.debug', function()
feed(':lua Test()\n')
screen:expect{grid=[[
|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*10
{1: }|
nil |
lua_debug> ^ |
@@ -213,14 +201,7 @@ describe('debug.debug', function()
feed('print("TEST")\n')
screen:expect([[
|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*8
{1: }|
nil |
lua_debug> print("TEST") |
@@ -230,8 +211,7 @@ describe('debug.debug', function()
feed('<C-c>')
screen:expect{grid=[[
|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*2
{1: }|
nil |
lua_debug> print("TEST") |
@@ -247,16 +227,7 @@ describe('debug.debug', function()
feed('<C-l>:lua Test()\n')
screen:expect([[
|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*10
{1: }|
nil |
lua_debug> ^ |
@@ -264,10 +235,7 @@ describe('debug.debug', function()
feed('\n')
screen:expect{grid=[[
|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*4
{1: }|
nil |
lua_debug> |
@@ -285,32 +253,14 @@ describe('debug.debug', function()
feed(':lua debug.debug() print("x")<cr>')
screen:expect{grid=[[
|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*12
lua_debug> ^ |
]]}
feed("conttt<cr>") -- misspelled cont; invalid syntax
screen:expect{grid=[[
|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*8
{1: }|
lua_debug> conttt |
{E:E5115: Error while loading debug string: (debug comma}|
@@ -321,12 +271,7 @@ describe('debug.debug', function()
feed("cont<cr>") -- exactly "cont", exit now
screen:expect{grid=[[
|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*6
{1: }|
lua_debug> conttt |
{E:E5115: Error while loading debug string: (debug comma}|
@@ -339,18 +284,7 @@ describe('debug.debug', function()
feed('<cr>')
screen:expect{grid=[[
^ |
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
- {0:~ }|
+ {0:~ }|*12
|
]]}
end)