mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
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)
378e6c03f9
This commit is contained in:
@@ -569,22 +569,41 @@ func Test_statusline_showcmd()
|
||||
CheckScreendump
|
||||
|
||||
let lines =<< trim END
|
||||
func MyStatusLine()
|
||||
return '%S'
|
||||
endfunc
|
||||
|
||||
set laststatus=2
|
||||
set statusline=%S
|
||||
set statusline=%!MyStatusLine()
|
||||
set showcmdloc=statusline
|
||||
call setline(1, ['a', 'b', 'c'])
|
||||
set foldopen+=jump
|
||||
1,2fold
|
||||
3
|
||||
END
|
||||
call writefile(lines, 'XTest_statusline', 'D')
|
||||
|
||||
let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 6})
|
||||
call feedkeys("\<C-V>Gl", "xt")
|
||||
|
||||
call term_sendkeys(buf, "g")
|
||||
call VerifyScreenDump(buf, 'Test_statusline_showcmd_1', {})
|
||||
|
||||
call feedkeys("\<Esc>1234", "xt")
|
||||
" typing "gg" should open the fold
|
||||
call term_sendkeys(buf, "g")
|
||||
call VerifyScreenDump(buf, 'Test_statusline_showcmd_2', {})
|
||||
|
||||
call feedkeys("\<Esc>:set statusline=\<CR>:\<CR>1234", "xt")
|
||||
call term_sendkeys(buf, "\<C-V>Gl")
|
||||
call VerifyScreenDump(buf, 'Test_statusline_showcmd_3', {})
|
||||
|
||||
call term_sendkeys(buf, "\<Esc>1234")
|
||||
call VerifyScreenDump(buf, 'Test_statusline_showcmd_4', {})
|
||||
|
||||
call term_sendkeys(buf, "\<Esc>:set statusline=\<CR>")
|
||||
call term_sendkeys(buf, ":\<CR>")
|
||||
call term_sendkeys(buf, "1234")
|
||||
call VerifyScreenDump(buf, 'Test_statusline_showcmd_5', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
@@ -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
|
||||
|
@@ -1761,6 +1761,8 @@ function Test_splitkeep_callback()
|
||||
|
||||
call term_sendkeys(buf, ":quit\<CR>Gt")
|
||||
call VerifyScreenDump(buf, 'Test_splitkeep_callback_4', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
function Test_splitkeep_fold()
|
||||
@@ -1791,6 +1793,8 @@ function Test_splitkeep_fold()
|
||||
|
||||
call term_sendkeys(buf, ":wincmd k\<CR>:quit\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_splitkeep_fold_4', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunction
|
||||
|
||||
function Test_splitkeep_status()
|
||||
@@ -1809,6 +1813,8 @@ function Test_splitkeep_status()
|
||||
|
||||
call term_sendkeys(buf, ":call win_move_statusline(win, 1)\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_splitkeep_status_1', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunction
|
||||
|
||||
function Test_new_help_window_on_error()
|
||||
|
Reference in New Issue
Block a user