From b959de3a5fca16b9bbd49e30da5dfcbd62bd9970 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 4 Jun 2021 22:18:24 -0400 Subject: 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 --- src/nvim/testdir/test_popup.vim | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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\") + call term_sendkeys(buf, "/X\:popup PopUp\") + 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\") + call VerifyScreenDump(buf, 'Test_popup_command_03', {}) + + call term_sendkeys(buf, "\") + call StopVimInTerminal(buf) + call delete('Xtest') +endfunc + func Test_popup_complete_backwards() new call setline(1, ['Post', 'Port', 'Po']) -- cgit