aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/inccommand_user_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/inccommand_user_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/inccommand_user_spec.lua')
-rw-r--r--test/functional/ui/inccommand_user_spec.lua100
1 files changed, 11 insertions, 89 deletions
diff --git a/test/functional/ui/inccommand_user_spec.lua b/test/functional/ui/inccommand_user_spec.lua
index da7508fad1..20e9dbdafa 100644
--- a/test/functional/ui/inccommand_user_spec.lua
+++ b/test/functional/ui/inccommand_user_spec.lua
@@ -270,13 +270,7 @@ describe("'inccommand' for user commands", function()
why won't it stop |
make the {1:cats} stop |
|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
+ {2:~ }|*7
:Replace text cats^ |
]])
end)
@@ -318,13 +312,7 @@ describe("'inccommand' for user commands", function()
why won't it stop |
make the text stop |
^ |
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
+ {2:~ }|*7
|
]])
end)
@@ -342,13 +330,7 @@ describe("'inccommand' for user commands", function()
why won't it stop |
make the cats stop |
^ |
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
+ {2:~ }|*7
:Replace text cats |
]])
end)
@@ -366,13 +348,7 @@ describe("'inccommand' for user commands", function()
why won't it stop |
make the text stop |
|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
+ {2:~ }|*7
:.Replace text cats^ |
]])
end)
@@ -425,13 +401,7 @@ describe("'inccommand' for user commands", function()
why won't it stop |
make the cats stop |
|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
+ {2:~ }|*7
:C^ |
]])
assert_alive()
@@ -481,13 +451,7 @@ describe("'inccommand' for user commands", function()
why won't it stop |
make the text stop |
a.a.a.a. |
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
+ {2:~ }|*7
:Test a.a.a.a.^ |
]])
feed('<C-V><Esc>u')
@@ -501,13 +465,7 @@ describe("'inccommand' for user commands", function()
why won't it stop |
make the text stop |
a.a.a. |
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
+ {2:~ }|*7
:Test a.a.a.a.{5:^[}u^ |
]])
feed('<Esc>')
@@ -521,13 +479,7 @@ describe("'inccommand' for user commands", function()
why won't it stop |
make the text stop |
^ |
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
- {2:~ }|
+ {2:~ }|*7
|
]])
end
@@ -581,17 +533,7 @@ describe("'inccommand' with multiple buffers", function()
baz {1:bar} bar │ bar baz {1:bar} |
{1:bar} bar baz │ baz {1:bar} bar |
│ |
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
+ {2:~ }│{2:~ }|*11
{4:[No Name] [+] }{3:[No Name] [+] }|
:Replace foo bar^ |
]])
@@ -601,17 +543,7 @@ describe("'inccommand' with multiple buffers", function()
baz bar bar │ bar baz bar |
bar bar baz │ baz bar bar |
^ │ |
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
+ {2:~ }│{2:~ }|*11
{4:[No Name] [+] }{3:[No Name] [+] }|
:Replace foo bar |
]])
@@ -645,17 +577,7 @@ describe("'inccommand' with multiple buffers", function()
baz bar bar │ bar baz bar |
bar bar baz │ baz bar bar |
^ │ |
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
- {2:~ }│{2:~ }|
+ {2:~ }│{2:~ }|*11
{4:[No Name] [+] }{3:[No Name] [+] }|
:Replace foo bar |
]])