diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-12-09 20:42:00 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-12-09 22:15:02 +0800 |
commit | 1037ce2e461034a20e35ad59969fd05d5ad68b91 (patch) | |
tree | 5cc490afac4607008bacf24d132015b63adfd1d0 /test/functional/ui/statuscolumn_spec.lua | |
parent | 5e43630a260e49ed494539d41cb832b1ee6d03c8 (diff) | |
download | rneovim-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/statuscolumn_spec.lua')
-rw-r--r-- | test/functional/ui/statuscolumn_spec.lua | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/test/functional/ui/statuscolumn_spec.lua b/test/functional/ui/statuscolumn_spec.lua index 6eaf15cfad..74a7e3607f 100644 --- a/test/functional/ui/statuscolumn_spec.lua +++ b/test/functional/ui/statuscolumn_spec.lua @@ -451,9 +451,7 @@ describe('statuscolumn', function() {4:wrapped 1 15}{5:aaaaaaaaa^ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}| {4:wrapped 2 15}{5:aaaaaaaaaaaaaaaaaaa }| {1:virtual-1 15}END | - {0:~ }| - {0:~ }| - {0:~ }| + {0:~ }|*3 | ]]) -- Also test virt_lines when 'cpoptions' includes "n" @@ -562,19 +560,9 @@ describe('statuscolumn', function() it('clicks and highlights work with control characters', function() meths.set_option_value('statuscolumn', '\t%#NonText#\1%0@MyClickFunc@\t\1%T\t%##\1', {}) screen:expect{grid=[[ - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | + {1:^I}{0:^A^I^A^I}{1:^A}aaaaa |*4 {1:^I}{0:^A^I^A^I}{1:^A}^aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | - {1:^I}{0:^A^I^A^I}{1:^A}aaaaa | + {1:^I}{0:^A^I^A^I}{1:^A}aaaaa |*8 | ]], attr_ids={ [0] = {foreground = Screen.colors.Blue, bold = true}; -- NonText @@ -702,8 +690,7 @@ describe('statuscolumn', function() ---------8 aaaaa | virt | ---------9 aaaaa | - ~ | - ~ | + ~ |*2 | ]]) end) @@ -718,11 +705,7 @@ describe('statuscolumn', function() [No Name] [+] | :1set stc=%^l | :2 | - ~ | - ~ | - ~ | - ~ | - ~ | + ~ |*5 [Command Line] | : | ]]) @@ -749,9 +732,7 @@ describe('statuscolumn', function() screen:expect([[ aaaaa | ^aaaaa | - aaaaa | - aaaaa | - aaaaa | + aaaaa |*3 | ]]) -- width correctly estimated with "w_nrwidth_line_count" when setting 'nu' |