]> granicus.if.org Git - vim/commitdiff
patch 8.1.1598: update to test file missing v8.1.1598
authorBram Moolenaar <Bram@vim.org>
Wed, 26 Jun 2019 01:54:08 +0000 (03:54 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 26 Jun 2019 01:54:08 +0000 (03:54 +0200)
Problem:    Update to test file missing.
Solution:   Update the popup window test file.

src/testdir/test_popupwin.vim
src/version.c

index b6cef00370799780ad259b87bd827683c8145b86..f65abe46e2e72015c47a2f946732eb7008d7386b 100644 (file)
@@ -134,6 +134,7 @@ func Test_popup_with_border_and_padding()
        \ 'core_width': 12,
        \ 'height': 3,
        \ 'core_height': 1,
+       \ 'firstline': 1,
        \ 'scrollbar': 0,
        \ 'visible': 1}
   let winid = popup_create('hello border', {'line': 2, 'col': 3, 'border': []})",
@@ -173,6 +174,7 @@ func Test_popup_with_border_and_padding()
        \ 'height': 5,
        \ 'scrollbar': 0,
        \ 'core_height': 1,
+       \ 'firstline': 1,
        \ 'visible': 1}, popup_getpos(winid))
 
   call popup_clear()
@@ -1426,6 +1428,13 @@ func Test_popup_scrollbar()
          \ 'minwidth': 8,
          \ 'maxheight': 4,
          \ })
+    func ScrollUp()
+      call feedkeys("\<F3>\<ScrollWheelUp>", "xt")
+    endfunc
+    func ScrollDown()
+      call feedkeys("\<F3>\<ScrollWheelDown>", "xt")
+    endfunc
+    map <silent> <F3> :call test_setmouse(5, 36)<CR>
   END
   call writefile(lines, 'XtestPopupScroll')
   let buf = RunVimInTerminal('-S XtestPopupScroll', {'rows': 10})
@@ -1440,6 +1449,16 @@ func Test_popup_scrollbar()
   call term_sendkeys(buf, ":call popup_setoptions(winid, {'firstline': 9})\<CR>")
   call VerifyScreenDump(buf, 'Test_popupwin_scroll_4', {})
 
+  call term_sendkeys(buf, ":call ScrollUp()\<CR>")
+  call VerifyScreenDump(buf, 'Test_popupwin_scroll_5', {})
+
+  call term_sendkeys(buf, ":call ScrollDown()\<CR>")
+  call VerifyScreenDump(buf, 'Test_popupwin_scroll_6', {})
+
+  call term_sendkeys(buf, ":call ScrollDown()\<CR>")
+  call term_sendkeys(buf, ":call ScrollDown()\<CR>")
+  call VerifyScreenDump(buf, 'Test_popupwin_scroll_7', {})
+
   " clean up
   call StopVimInTerminal(buf)
   call delete('XtestPopupScroll')
index b4d568c6d05b79f14c071403c0e8aa66e59cae7a..f74cb66db691755c15a86c65bb4f60a71b7000b1 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1598,
 /**/
     1597,
 /**/