aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/input_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/ui/input_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/ui/input_spec.lua')
-rw-r--r--test/functional/ui/input_spec.lua44
1 files changed, 8 insertions, 36 deletions
diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua
index 05d55b94fb..a3ab1a4ab6 100644
--- a/test/functional/ui/input_spec.lua
+++ b/test/functional/ui/input_spec.lua
@@ -273,9 +273,7 @@ it('typing a simplifiable key at hit-enter prompt triggers mapping vim-patch:8.2
feed_command('ls')
screen:expect([[
|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
{2: }|
:ls |
1 %a "[No Name]" line 1 |
@@ -284,12 +282,7 @@ it('typing a simplifiable key at hit-enter prompt triggers mapping vim-patch:8.2
feed('<C-6>')
screen:expect([[
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*6
hit ctrl-6 |
]])
end)
@@ -333,12 +326,7 @@ describe('input non-printable chars', function()
feed_command("e Xtest-overwrite")
screen:expect([[
^foobar |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*6
"Xtest-overwrite" [noeol] 1L, 6B |
]])
@@ -348,9 +336,7 @@ describe('input non-printable chars', function()
feed_command("w")
screen:expect([[
foobar |
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*3
{4: }|
"Xtest-overwrite" |
{2:WARNING: The file has been changed since reading it!!!} |
@@ -360,8 +346,7 @@ describe('input non-printable chars', function()
feed("u")
screen:expect([[
foobar |
- {1:~ }|
- {1:~ }|
+ {1:~ }|*2
{4: }|
"Xtest-overwrite" |
{2:WARNING: The file has been changed since reading it!!!} |
@@ -396,12 +381,7 @@ describe('input non-printable chars', function()
feed("<cr>")
screen:expect([[
^foobar |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*6
|
]])
end)
@@ -449,11 +429,7 @@ describe('display is updated', function()
screen:expect([[
abc |
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
{2:-- INSERT --} |
]])
end)
@@ -465,11 +441,7 @@ describe('display is updated', function()
screen:expect([[
abc |
^ |
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
- {1:~ }|
+ {1:~ }|*5
{2:-- INSERT --} |
]])
end)