]> granicus.if.org Git - vim/commitdiff
patch 8.2.2937: popup test fails if rightleft feature not enabled v8.2.2937
authorDominique Pelle <dominique.pelle@gmail.com>
Fri, 4 Jun 2021 19:09:55 +0000 (21:09 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 4 Jun 2021 19:09:55 +0000 (21:09 +0200)
Problem:    Popup test fails if rightleft feature not enabled.
Solution:   Check that the rightleft feature is available. (Dominique PellĂ©,
            closes #8321)

src/testdir/test_popup.vim
src/version.c

index 88aeafda7efa36742fe70f81acd4c6d9ff37c8ff..1d0a77c17c3685683454f0bc3ec16e6d87f73a63 100644 (file)
@@ -1147,7 +1147,9 @@ endfunc
 
 " Test for the popup menu with the 'rightleft' option set
 func Test_pum_rightleft()
+  CheckFeature rightleft
   CheckScreendump
+
   let lines =<< trim END
     abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
     vim
@@ -1204,11 +1206,13 @@ func Test_pum_scrollbar()
   call term_sendkeys(buf, "\<C-E>\<Esc>dd")
   call term_wait(buf)
 
-  call term_sendkeys(buf, ":set rightleft\<CR>")
-  call term_wait(buf)
-  call term_sendkeys(buf, "Go\<C-P>\<C-P>\<C-P>")
-  call term_wait(buf)
-  call VerifyScreenDump(buf, 'Test_pum_scrollbar_02', {'rows': 7})
+  if has('rightleft')
+    call term_sendkeys(buf, ":set rightleft\<CR>")
+    call term_wait(buf)
+    call term_sendkeys(buf, "Go\<C-P>\<C-P>\<C-P>")
+    call term_wait(buf)
+    call VerifyScreenDump(buf, 'Test_pum_scrollbar_02', {'rows': 7})
+  endif
 
   call StopVimInTerminal(buf)
   call delete('Xtest1')
index a230c4eb0b9c60098e4e55e8e2c58dfe76ea9d01..d59df5c3c7e936efb0651b626497643017b98bb1 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2937,
 /**/
     2936,
 /**/