diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
commit | ff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch) | |
tree | 729bbcb92231538fa61dab6c3d890b025484b7f5 /test/functional/legacy/window_cmd_spec.lua | |
parent | 376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff) | |
parent | 28c04948a1c887a1cc0cb64de79fa32631700466 (diff) | |
download | rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2 rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/functional/legacy/window_cmd_spec.lua')
-rw-r--r-- | test/functional/legacy/window_cmd_spec.lua | 170 |
1 files changed, 84 insertions, 86 deletions
diff --git a/test/functional/legacy/window_cmd_spec.lua b/test/functional/legacy/window_cmd_spec.lua index 7fe4ec8eb6..332240d04a 100644 --- a/test/functional/legacy/window_cmd_spec.lua +++ b/test/functional/legacy/window_cmd_spec.lua @@ -1,18 +1,16 @@ -local helpers = require('test.functional.helpers')(after_each) +local n = require('test.functional.testnvim')() local Screen = require('test.functional.ui.screen') -local clear = helpers.clear -local exec = helpers.exec -local exec_lua = helpers.exec_lua -local command = helpers.command -local feed = helpers.feed + +local clear = n.clear +local exec = n.exec +local exec_lua = n.exec_lua +local command = n.command +local feed = n.feed -- oldtest: Test_window_cmd_ls0_split_scrolling() it('scrolling with laststatus=0 and :botright split', function() clear('--cmd', 'set ruler') local screen = Screen.new(40, 10) - screen:set_default_attr_ids({ - [1] = { reverse = true }, -- StatusLineNC - }) screen:attach() exec([[ set laststatus=0 @@ -25,7 +23,7 @@ it('scrolling with laststatus=0 and :botright split', function() 98 | 99 | 100 | - {1:[No Name] [+] 100,1 Bot}| + {2:[No Name] [+] 100,1 Bot}| 97 | 98 | 99 | @@ -65,10 +63,10 @@ describe('splitkeep', function() 99 | ^100 | 101 | - [No Name] [+] | + {3:[No Name] [+] }| 5 | 6 | - [No Name] [+] | + {2:[No Name] [+] }| | ]]) @@ -77,10 +75,10 @@ describe('splitkeep', function() 100 | ^101 | 102 | - [No Name] [+] | + {3:[No Name] [+] }| 5 | 6 | - [No Name] [+] | + {2:[No Name] [+] }| | ]]) @@ -90,10 +88,10 @@ describe('splitkeep', function() 198 | 199 | ^200 | - [No Name] [+] | + {3:[No Name] [+] }| 5 | 6 | - [No Name] [+] | + {2:[No Name] [+] }| | ]]) end) @@ -135,13 +133,13 @@ describe('splitkeep', function() 3 | 4 | 5 | - [No Name] [+] | + {2:[No Name] [+] }| ^7 | 8 | 9 | 10 | 11 | - [No Name] [+] | + {3:[No Name] [+] }| | ]]) feed(':quit<CR>Ht') @@ -152,13 +150,13 @@ describe('splitkeep', function() 3 | 4 | 5 | - [No Name] [+] | + {3:[No Name] [+] }| 7 | 8 | 9 | 10 | 11 | - [No Name] [+] | + {2:[No Name] [+] }| :quit | ]]) feed(':set sb<CR>:quit<CR>Gj') @@ -168,14 +166,14 @@ describe('splitkeep', function() 3 | 4 | ^5 | - [No Name] [+] | + {3:[No Name] [+] }| 7 | 8 | 9 | 10 | 11 | 12 | - [No Name] [+] | + {2:[No Name] [+] }| :quit | ]]) feed(':quit<CR>Gt') @@ -185,14 +183,14 @@ describe('splitkeep', function() 3 | 4 | 5 | - [No Name] [+] | + {2:[No Name] [+] }| 7 | 8 | 9 | 10 | 11 | ^12 | - [No Name] [+] | + {3:[No Name] [+] }| :quit | ]]) end) @@ -213,70 +211,70 @@ describe('splitkeep', function() ]]) feed('L:wincmd s<CR>') screen:expect([[ - 1 +-- 7 lines: int FuncName() {···················| - 8 after fold | - 9 +-- 7 lines: int FuncName() {···················| - 16 after fold | - 17 +-- 7 lines: int FuncName() {···················| - 24 ^after fold | - [No Name] [+] | - 32 after fold | - 33 +-- 7 lines: int FuncName() {···················| - 40 after fold | - 41 +-- 7 lines: int FuncName() {···················| - 48 after fold | - [No Name] [+] | + {8: 1 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 8 }after fold | + {8: 9 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 16 }after fold | + {8: 17 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 24 }^after fold | + {3:[No Name] [+] }| + {8: 32 }after fold | + {8: 33 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 40 }after fold | + {8: 41 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 48 }after fold | + {2:[No Name] [+] }| :wincmd s | ]]) feed(':quit<CR>') screen:expect([[ - 1 +-- 7 lines: int FuncName() {···················| - 8 after fold | - 9 +-- 7 lines: int FuncName() {···················| - 16 after fold | - 17 +-- 7 lines: int FuncName() {···················| - 24 after fold | - 25 +-- 7 lines: int FuncName() {···················| - 32 after fold | - 33 +-- 7 lines: int FuncName() {···················| - 40 after fold | - 41 +-- 7 lines: int FuncName() {···················| - 48 after fold | - 49 ^+-- 7 lines: int FuncName() {···················| + {8: 1 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 8 }after fold | + {8: 9 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 16 }after fold | + {8: 17 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 24 }after fold | + {8: 25 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 32 }after fold | + {8: 33 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 40 }after fold | + {8: 41 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 48 }after fold | + {8: 49 }{13:^+-- 7 lines: int FuncName() {···················}| :quit | ]]) feed('H:below split<CR>') screen:expect([[ - 1 +-- 7 lines: int FuncName() {···················| - 8 after fold | - 9 +-- 7 lines: int FuncName() {···················| - 16 after fold | - 17 +-- 7 lines: int FuncName() {···················| - [No Name] [+] | - 25 ^+-- 7 lines: int FuncName() {···················| - 32 after fold | - 33 +-- 7 lines: int FuncName() {···················| - 40 after fold | - 41 +-- 7 lines: int FuncName() {···················| - 48 after fold | - [No Name] [+] | + {8: 1 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 8 }after fold | + {8: 9 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 16 }after fold | + {8: 17 }{13:+-- 7 lines: int FuncName() {···················}| + {2:[No Name] [+] }| + {8: 25 }{13:^+-- 7 lines: int FuncName() {···················}| + {8: 32 }after fold | + {8: 33 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 40 }after fold | + {8: 41 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 48 }after fold | + {3:[No Name] [+] }| :below split | ]]) feed(':wincmd k<CR>:quit<CR>') screen:expect([[ - 1 +-- 7 lines: int FuncName() {···················| - 8 after fold | - 9 +-- 7 lines: int FuncName() {···················| - 16 after fold | - 17 +-- 7 lines: int FuncName() {···················| - 24 after fold | - 25 ^+-- 7 lines: int FuncName() {···················| - 32 after fold | - 33 +-- 7 lines: int FuncName() {···················| - 40 after fold | - 41 +-- 7 lines: int FuncName() {···················| - 48 after fold | - 49 +-- 7 lines: int FuncName() {···················| + {8: 1 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 8 }after fold | + {8: 9 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 16 }after fold | + {8: 17 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 24 }after fold | + {8: 25 }{13:^+-- 7 lines: int FuncName() {···················}| + {8: 32 }after fold | + {8: 33 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 40 }after fold | + {8: 41 }{13:+-- 7 lines: int FuncName() {···················}| + {8: 48 }after fold | + {8: 49 }{13:+-- 7 lines: int FuncName() {···················}| :quit | ]]) end) @@ -296,13 +294,13 @@ describe('splitkeep', function() a | b | c | - ~ |*4 - [No Name] | + {1:~ }|*4 + {2:[No Name] }| ^a | b | c | - ~ | - [No Name] | + {1:~ }| + {3:[No Name] }| | ]]) end) @@ -317,16 +315,16 @@ describe('splitkeep', function() wincmd s ]]) screen:expect([[ - <<<e line with lots of text in one line | + {1:<<<}e line with lots of text in one line | with lots of text in one line with lots | of text in one line | - ~ | - [No Name] [+] | - <<<e line with lots of text in one line | + {1:~ }| + {2:[No Name] [+] }| + {1:<<<}e line with lots of text in one line | ^with lots of text in one line with lots | of text in one line | - ~ |*2 - [No Name] [+] | + {1:~ }|*2 + {3:[No Name] [+] }| | ]]) end) |