mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
vim-patch:8.0.1578: no test for :popup in terminal
Problem: No test for :popup in terminal.
Solution: Add a screen dump test.
69f5a3011d
This commit is contained in:
@@ -850,6 +850,34 @@ func Test_popup_position()
|
|||||||
call delete('Xtest')
|
call delete('Xtest')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_popup_command()
|
||||||
|
if !CanRunVimInTerminal() || !has('menu')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
call writefile([
|
||||||
|
\ 'one two three four five',
|
||||||
|
\ 'and one two Xthree four five',
|
||||||
|
\ 'one more two three four five',
|
||||||
|
\ ], 'Xtest')
|
||||||
|
let buf = RunVimInTerminal('Xtest', {})
|
||||||
|
call term_sendkeys(buf, ":source $VIMRUNTIME/menu.vim\<CR>")
|
||||||
|
call term_sendkeys(buf, "/X\<CR>:popup PopUp\<CR>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_popup_command_01', {})
|
||||||
|
|
||||||
|
" Select a word
|
||||||
|
call term_sendkeys(buf, "jj")
|
||||||
|
call VerifyScreenDump(buf, 'Test_popup_command_02', {})
|
||||||
|
|
||||||
|
" Select a word
|
||||||
|
call term_sendkeys(buf, "j\<CR>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_popup_command_03', {})
|
||||||
|
|
||||||
|
call term_sendkeys(buf, "\<Esc>")
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
call delete('Xtest')
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_popup_complete_backwards()
|
func Test_popup_complete_backwards()
|
||||||
new
|
new
|
||||||
call setline(1, ['Post', 'Port', 'Po'])
|
call setline(1, ['Post', 'Port', 'Po'])
|
||||||
|
Reference in New Issue
Block a user