]> granicus.if.org Git - vim/commitdiff
patch 8.2.0447: terminal scroll tests fails on some systems v8.2.0447
authorBram Moolenaar <Bram@vim.org>
Wed, 25 Mar 2020 20:27:22 +0000 (21:27 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 25 Mar 2020 20:27:22 +0000 (21:27 +0100)
Problem:    Terminal scroll tests fails on some systems.
Solution:   Remove the fixed 100msec wait for Win32.  Add a loop to wait until
            scrolling has finished. (James McCoy, closes #5842)

src/testdir/test_terminal.vim
src/version.c

index f56c7facfced4c739a557c2f0798515b48fd84a5..f3571d4e4bc4f2b091c38ce98681d4a0662c8eb9 100644 (file)
@@ -298,13 +298,16 @@ func Test_terminal_scroll()
   let job = term_getjob(buf)
   call WaitForAssert({-> assert_equal("dead", job_status(job))})
   call term_wait(buf)
-  if has('win32')
-    " TODO: this should not be needed
-    sleep 100m
-  endif
 
-  let scrolled = buf->term_getscrolled()
-  call assert_equal(scrolled, term_getscrolled(buf))
+  " wait until the scrolling stops
+  while 1
+    let scrolled = buf->term_getscrolled()
+    sleep 20m
+    if scrolled == buf->term_getscrolled()
+      break
+    endif
+  endwhile
+
   call assert_equal('1', getline(1))
   call assert_equal('1', term_getline(buf, 1 - scrolled))
   call assert_equal('49', getline(49))
index 6b5e252a92c11c92adf230020c2c8d14d190505d..b54ac5aa9525bbdef652096aebaca78d2e53e0d6 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    447,
 /**/
     446,
 /**/