summaryrefslogtreecommitdiff
path: root/src/testdir/test_popupwin.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_popupwin.vim')
-rw-r--r--src/testdir/test_popupwin.vim39
1 files changed, 38 insertions, 1 deletions
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index a92dc2550..954086cae 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -3516,7 +3516,44 @@ func Test_popupwin_filter_close_ctrl_c()
call VerifyScreenDump(buf, 'Test_popupwin_ctrl_c', {})
call StopVimInTerminal(buf)
- call delete('XtestPopupCorners')
+ call delete('XtestPopupCtrlC')
+endfunc
+
+func Test_popupwin_filter_close_wrong_name()
+ CheckScreendump
+
+ let lines =<< trim END
+ call popup_create('one two three...', {'filter': 'NoSuchFunc'})
+ END
+ call writefile(lines, 'XtestPopupWrongName')
+
+ let buf = RunVimInTerminal('-S XtestPopupWrongName', #{rows: 10})
+
+ call term_sendkeys(buf, "j")
+ call VerifyScreenDump(buf, 'Test_popupwin_wrong_name', {})
+
+ call StopVimInTerminal(buf)
+ call delete('XtestPopupWrongName')
+endfunc
+
+func Test_popupwin_filter_close_three_errors()
+ CheckScreendump
+
+ let lines =<< trim END
+ set cmdheight=2
+ call popup_create('one two three...', {'filter': 'filter'})
+ END
+ call writefile(lines, 'XtestPopupThreeErrors')
+
+ let buf = RunVimInTerminal('-S XtestPopupThreeErrors', #{rows: 10})
+
+ call term_sendkeys(buf, "jj")
+ call VerifyScreenDump(buf, 'Test_popupwin_three_errors_1', {})
+ call term_sendkeys(buf, "j")
+ call VerifyScreenDump(buf, 'Test_popupwin_three_errors_2', {})
+
+ call StopVimInTerminal(buf)
+ call delete('XtestPopupThreeErrors')
endfunc
func Test_popupwin_atcursor_far_right()