diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-04 22:18:24 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-05 12:49:26 -0400 |
commit | b959de3a5fca16b9bbd49e30da5dfcbd62bd9970 (patch) | |
tree | baa1bc91975a328415aec2805e7fcd279497d964 | |
parent | 60bf49ab1c80f23c533eb961457524b973e395ff (diff) | |
download | rneovim-b959de3a5fca16b9bbd49e30da5dfcbd62bd9970.tar.gz rneovim-b959de3a5fca16b9bbd49e30da5dfcbd62bd9970.tar.bz2 rneovim-b959de3a5fca16b9bbd49e30da5dfcbd62bd9970.zip |
vim-patch:8.0.1578: no test for :popup in terminal
Problem: No test for :popup in terminal.
Solution: Add a screen dump test.
https://github.com/vim/vim/commit/69f5a3011d5a93e0d54837e97d625bd6c253d897
-rw-r--r-- | src/nvim/testdir/test_popup.vim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_popup.vim b/src/nvim/testdir/test_popup.vim index 027533e1ad..06bdb1236a 100644 --- a/src/nvim/testdir/test_popup.vim +++ b/src/nvim/testdir/test_popup.vim @@ -850,6 +850,34 @@ func Test_popup_position() call delete('Xtest') 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() new call setline(1, ['Post', 'Port', 'Po']) |