diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-14 20:50:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-14 20:50:53 +0800 |
commit | d549734fb4792bcdb5395006538f7c6d856252e7 (patch) | |
tree | df8dff752a66b45605d72502a04e61718e1e391c /test | |
parent | bf0839044254482e02cc5e05b07e0b465a47e1e4 (diff) | |
parent | d98e4e4b2ecd84162635a5f354dc4ddc6a49abc5 (diff) | |
download | rneovim-d549734fb4792bcdb5395006538f7c6d856252e7.tar.gz rneovim-d549734fb4792bcdb5395006538f7c6d856252e7.tar.bz2 rneovim-d549734fb4792bcdb5395006538f7c6d856252e7.zip |
Merge pull request #21795 from zeertzjq/vim-8.2.4346
vim-patch:8.2.{4346,4382,4391},9.0.1195
N/A patches for version.c:
vim-patch:9.0.1197: dump file missing from patch
Problem: Dump file missing from patch.
Solution: Add missing dump file.
https://github.com/vim/vim/commit/034c350207931a7ff57c76536d4703f6da595919
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/legacy/statusline_spec.lua | 38 | ||||
-rw-r--r-- | test/functional/legacy/tabline_spec.lua | 51 |
2 files changed, 86 insertions, 3 deletions
diff --git a/test/functional/legacy/statusline_spec.lua b/test/functional/legacy/statusline_spec.lua index 056209154e..c5b17f8749 100644 --- a/test/functional/legacy/statusline_spec.lua +++ b/test/functional/legacy/statusline_spec.lua @@ -76,14 +76,46 @@ describe('statusline', function() [1] = {background = Screen.colors.LightGrey}, -- Visual [2] = {bold = true}, -- MoreMsg [3] = {bold = true, reverse = true}, -- StatusLine + [5] = {background = Screen.colors.LightGrey, foreground = Screen.colors.DarkBlue}, -- Folded }) exec([[ + func MyStatusLine() + return '%S' + endfunc + set showcmd set laststatus=2 set statusline=%S set showcmdloc=statusline call setline(1, ['a', 'b', 'c']) + set foldopen+=jump + 1,2fold + 3 + ]]) + + feed('g') + screen:expect([[ + {5:+-- 2 lines: a···································}| + ^c | + {0:~ }| + {0:~ }| + {0:~ }| + {3:g }| + | ]]) + + -- typing "gg" should open the fold + feed('g') + screen:expect([[ + ^a | + b | + c | + {0:~ }| + {0:~ }| + {3: }| + | + ]]) + feed('<C-V>Gl') screen:expect([[ {1:a} | @@ -94,6 +126,7 @@ describe('statusline', function() {3:3x2 }| {2:-- VISUAL BLOCK --} | ]]) + feed('<Esc>1234') screen:expect([[ a | @@ -104,7 +137,10 @@ describe('statusline', function() {3:1234 }| | ]]) - feed('<Esc>:set statusline=<CR>:<CR>1234') + + feed('<Esc>:set statusline=<CR>') + feed(':<CR>') + feed('1234') screen:expect([[ a | b | diff --git a/test/functional/legacy/tabline_spec.lua b/test/functional/legacy/tabline_spec.lua index d858f137c5..6b368d1857 100644 --- a/test/functional/legacy/tabline_spec.lua +++ b/test/functional/legacy/tabline_spec.lua @@ -22,16 +22,49 @@ describe('tabline', function() [2] = {bold = true}, -- MoreMsg, TabLineSel [3] = {reverse = true}, -- TabLineFill [4] = {background = Screen.colors.LightGrey, underline = true}, -- TabLine + [5] = {background = Screen.colors.LightGrey, foreground = Screen.colors.DarkBlue}, -- Folded }) exec([[ + func MyTabLine() + return '%S' + endfunc + set showcmd set showtabline=2 + set tabline=%!MyTabLine() set showcmdloc=tabline call setline(1, ['a', 'b', 'c']) + set foldopen+=jump + 1,2fold + 3 + ]]) + + feed('g') + screen:expect([[ + {3:g }| + {5:+-- 2 lines: a···································}| + ^c | + {0:~ }| + {0:~ }| + {0:~ }| + | + ]]) + + -- typing "gg" should open the fold + feed('g') + screen:expect([[ + {3: }| + ^a | + b | + c | + {0:~ }| + {0:~ }| + | ]]) + feed('<C-V>Gl') screen:expect([[ - {2: + [No Name] }{3: }{4:3x2}{3: }| + {3:3x2 }| {1:a} | {1:b} | {1:c}^ | @@ -39,9 +72,10 @@ describe('tabline', function() {0:~ }| {2:-- VISUAL BLOCK --} | ]]) + feed('<Esc>1234') screen:expect([[ - {2: + [No Name] }{3: }{4:1234}{3: }| + {3:1234 }| a | b | ^c | @@ -49,5 +83,18 @@ describe('tabline', function() {0:~ }| | ]]) + + feed('<Esc>:set tabline=<CR>') + feed(':<CR>') + feed('1234') + screen:expect([[ + {2: + [No Name] }{3: }{4:1234}{3: }| + a | + b | + ^c | + {0:~ }| + {0:~ }| + : | + ]]) end) end) |