]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.2154: popupwin test for terminal buffer fails sometimes v8.2.2154
authorBram Moolenaar <Bram@vim.org>
Thu, 17 Dec 2020 21:27:38 +0000 (22:27 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 17 Dec 2020 21:27:38 +0000 (22:27 +0100)
Problem:    Popupwin test for terminal buffer fails sometimes.
Solution:   Wait for the prompt to appear.

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

index ca7c6a917d4f96fa7e98289e558c4c05fe1e8095..a36e0f59974bcf7e4b29fd54059cb66a9c432a8f 100644 (file)
@@ -2673,13 +2673,14 @@ func Test_popupwin_terminal_buffer()
 
   let termbuf = term_start(&shell, #{hidden: 1})
   let winid = popup_create(termbuf, #{minwidth: 40, minheight: 10, border: []})
-  " Wait for shell to start and show a prompt
+  " Wait for shell to start
   call WaitForAssert({-> assert_equal("run", job_status(term_getjob(termbuf)))})
-  sleep 20m
+  " Wait for a prompt (see border char first, then space after prompt)
+  call WaitForAssert({ -> assert_equal(' ', screenstring(screenrow(), screencol() - 1))})
 
   " When typing a character, the cursor is after it.
   call feedkeys("x", 'xt')
-  sleep 10m
+  call term_wait(termbuf)
   redraw
   call WaitForAssert({ -> assert_equal('x', screenstring(screenrow(), screencol() - 1))})
   call feedkeys("\<BS>", 'xt')
index 2bb336e0bb632672182e844bf7796fb92b3cfdab..bd2fd5d989789f1c647dd53c9e01dea6713d90c9 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2154,
 /**/
     2153,
 /**/