aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_tabline.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-14 19:52:44 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-01-14 20:27:40 +0800
commitd98e4e4b2ecd84162635a5f354dc4ddc6a49abc5 (patch)
treedf8dff752a66b45605d72502a04e61718e1e391c /src/nvim/testdir/test_tabline.vim
parentf95ad61a8945b64a58750073e2cb2beb30767062 (diff)
downloadrneovim-d98e4e4b2ecd84162635a5f354dc4ddc6a49abc5.tar.gz
rneovim-d98e4e4b2ecd84162635a5f354dc4ddc6a49abc5.tar.bz2
rneovim-d98e4e4b2ecd84162635a5f354dc4ddc6a49abc5.zip
vim-patch:9.0.1195: restoring KeyTyped when building statusline not tested
Problem: Restoring KeyTyped when building statusline not tested. Solution: Add a test. Clean up and fix other tests. (closes vim/vim#11815) https://github.com/vim/vim/commit/378e6c03f98efc88e8c2675e05a548f9bb7889a1
Diffstat (limited to 'src/nvim/testdir/test_tabline.vim')
-rw-r--r--src/nvim/testdir/test_tabline.vim26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_tabline.vim b/src/nvim/testdir/test_tabline.vim
index 20a9657f32..d9bef09067 100644
--- a/src/nvim/testdir/test_tabline.vim
+++ b/src/nvim/testdir/test_tabline.vim
@@ -167,19 +167,41 @@ func Test_tabline_showcmd()
CheckScreendump
let lines =<< trim END
+ func MyTabLine()
+ return '%S'
+ endfunc
+
set showtabline=2
+ set tabline=%!MyTabLine()
set showcmdloc=tabline
call setline(1, ['a', 'b', 'c'])
+ set foldopen+=jump
+ 1,2fold
+ 3
END
call writefile(lines, 'XTest_tabline', 'D')
let buf = RunVimInTerminal('-S XTest_tabline', {'rows': 6})
- call feedkeys("\<C-V>Gl", "xt")
+ call term_sendkeys(buf, "g")
call VerifyScreenDump(buf, 'Test_tabline_showcmd_1', {})
- call feedkeys("\<Esc>1234", "xt")
+ " typing "gg" should open the fold
+ call term_sendkeys(buf, "g")
call VerifyScreenDump(buf, 'Test_tabline_showcmd_2', {})
+
+ call term_sendkeys(buf, "\<C-V>Gl")
+ call VerifyScreenDump(buf, 'Test_tabline_showcmd_3', {})
+
+ call term_sendkeys(buf, "\<Esc>1234")
+ call VerifyScreenDump(buf, 'Test_tabline_showcmd_4', {})
+
+ call term_sendkeys(buf, "\<Esc>:set tabline=\<CR>")
+ call term_sendkeys(buf, ":\<CR>")
+ call term_sendkeys(buf, "1234")
+ call VerifyScreenDump(buf, 'Test_tabline_showcmd_5', {})
+
+ call StopVimInTerminal(buf)
endfunc
" vim: shiftwidth=2 sts=2 expandtab