diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-12-09 22:33:31 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-09 22:33:31 +0800 |
| commit | ec3c569dd8f646d5e9cf6365f74b89fab7c16091 (patch) | |
| tree | 5cc490afac4607008bacf24d132015b63adfd1d0 /test/functional/terminal/buffer_spec.lua | |
| parent | 8be24fed8ffac51aa4808786ab010e8b87070324 (diff) | |
| parent | 1037ce2e461034a20e35ad59969fd05d5ad68b91 (diff) | |
| download | rneovim-ec3c569dd8f646d5e9cf6365f74b89fab7c16091.tar.gz rneovim-ec3c569dd8f646d5e9cf6365f74b89fab7c16091.tar.bz2 rneovim-ec3c569dd8f646d5e9cf6365f74b89fab7c16091.zip | |
Merge pull request #26490 from zeertzjq/screen-repeat
test: avoid repeated screen lines in expected states
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
| -rw-r--r-- | test/functional/terminal/buffer_spec.lua | 81 |
1 files changed, 17 insertions, 64 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index ece09bca88..02958a69e0 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -60,11 +60,7 @@ describe(':terminal buffer', function() feed('<c-\\><c-n>:set bufhidden=wipe<cr>:enew<cr>') screen:expect([[ ^ | - {4:~ }| - {4:~ }| - {4:~ }| - {4:~ }| - {4:~ }| + {4:~ }|*5 :enew | ]]) end) @@ -73,11 +69,7 @@ describe(':terminal buffer', function() feed(':bnext:l<esc>') screen:expect([[ ^ | - {4:~ }| - {4:~ }| - {4:~ }| - {4:~ }| - {4:~ }| + {4:~ }|*5 | ]]) end) @@ -89,11 +81,7 @@ describe(':terminal buffer', function() screen:expect([[ tty ready | {2:^ } | - | - | - | - | - | + |*5 ]]) end) @@ -113,10 +101,7 @@ describe(':terminal buffer', function() screen:expect([[ tty ready | {2:^ } | - | - | - | - | + |*4 {8:E21: Cannot make changes, 'modifiable' is off} | ]]) end) @@ -127,22 +112,16 @@ describe(':terminal buffer', function() feed('"ap"ap') screen:expect([[ ^tty ready | - appended tty ready | - appended tty ready | + appended tty ready |*2 {2: } | - | - | + |*2 :let @a = "appended " . @a | ]]) -- operator count is also taken into consideration feed('3"ap') screen:expect([[ ^tty ready | - appended tty ready | - appended tty ready | - appended tty ready | - appended tty ready | - appended tty ready | + appended tty ready |*5 :let @a = "appended " . @a | ]]) end) @@ -155,17 +134,14 @@ describe(':terminal buffer', function() ^tty ready | appended tty ready | {2: } | - | - | - | + |*3 :put a | ]]) -- line argument is only used to move the cursor feed_command('6put a') screen:expect([[ tty ready | - appended tty ready | - appended tty ready | + appended tty ready |*2 {2: } | | ^ | @@ -177,21 +153,13 @@ describe(':terminal buffer', function() feed('<c-\\><c-n>:bd!<cr>') screen:expect([[ ^ | - {4:~ }| - {4:~ }| - {4:~ }| - {4:~ }| - {4:~ }| + {4:~ }|*5 :bd! | ]]) feed_command('bnext') screen:expect([[ ^ | - {4:~ }| - {4:~ }| - {4:~ }| - {4:~ }| - {4:~ }| + {4:~ }|*5 :bnext | ]]) end) @@ -268,10 +236,7 @@ describe(':terminal buffer', function() screen:expect([[ ydaer ytt| {1:a}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| - | - | - | - | + |*4 {3:-- TERMINAL --} | ]]) command('bdelete!') @@ -309,10 +274,7 @@ describe(':terminal buffer', function() screen:expect{grid=[[ tty ready | {2:^ } | - | - | - | - | + |*4 {3:-- (terminal) --} | ]]} eq('ntT', funcs.mode(1)) @@ -321,10 +283,7 @@ describe(':terminal buffer', function() screen:expect{grid=[[ tty ready | {2: } | - | - | - | - | + |*4 :let g:x = 17^ | ]]} @@ -332,10 +291,7 @@ describe(':terminal buffer', function() screen:expect{grid=[[ tty ready | {1: } | - | - | - | - | + |*4 {3:-- TERMINAL --} | ]]} eq('t', funcs.mode(1)) @@ -456,9 +412,7 @@ describe('terminal input', function() }) screen:expect{grid=[[ {1: } | - {4:~ }| - {4:~ }| - {4:~ }| + {4:~ }|*3 {5:[No Name] 0,1 All}| {3:-- INSERT --} | {3:-- TERMINAL --} | @@ -580,8 +534,7 @@ describe('termopen()', function() screen:expect(([[ ^%s{MATCH:%%s+}| [Process exited 0] | - | - | + |*2 ]]):format(expected)) end |
