diff src/testdir/test_popupwin.vim @ 17604:506dd2efcbb2 v8.1.1799

patch 8.1.1799: cannot avoid mapping for a popup window commit https://github.com/vim/vim/commit/749fa0af85232be1d44b77a09161f71cdbace62c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 3 16:18:07 2019 +0200 patch 8.1.1799: cannot avoid mapping for a popup window Problem: Cannot avoid mapping for a popup window. Solution: Add the "mapping" property, default TRUE.
author Bram Moolenaar <Bram@vim.org>
date Sat, 03 Aug 2019 16:30:06 +0200
parents d5e5d0fc3fa8
children 2ae30dac20d6
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -657,6 +657,7 @@ func Test_popup_invalid_arguments()
   call assert_fails('call popup_create("text", #{mask: ["asdf"]})', 'E475:')
   call popup_clear()
   call assert_fails('call popup_create("text", #{mask: test_null_list()})', 'E475:')
+  call assert_fails('call popup_create("text", #{mapping: []})', 'E745:')
   call popup_clear()
 endfunc
 
@@ -1203,6 +1204,8 @@ func Test_popup_menu()
     let s:cb_winid = a:id
     let s:cb_res = a:res
   endfunc
+  " mapping won't be used in popup
+  map j k
 
   let winid = ShowMenu(" ", 1)
   let winid = ShowMenu("j \<CR>", 2)
@@ -1215,6 +1218,7 @@ func Test_popup_menu()
   let winid = ShowMenu("\<C-C>", -1)
 
   delfunc QuitCallback
+  unmap j
 endfunc
 
 func Test_popup_menu_screenshot()
@@ -2194,6 +2198,9 @@ func Test_previewpopup()
   call term_sendkeys(buf, "/another\<CR>\<C-W>}")
   call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_4', {})
 
+  call term_sendkeys(buf, ":cd ..\<CR>:\<CR>")
+  call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_5', {})
+
   call StopVimInTerminal(buf)
   call delete('Xtags')
   call delete('Xtagfile')