summaryrefslogtreecommitdiff
path: root/src/testdir/test_terminal.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-25 21:27:22 +0100
committerBram Moolenaar <Bram@vim.org>2020-03-25 21:27:22 +0100
commitbfcfd5784a2fe950d8e58d1d534bbbb4824524eb (patch)
tree68a3b1ceb7a5238fc242e607aab00693a42a29af /src/testdir/test_terminal.vim
parenta07e31af545b91925362854a48c42fee16dd8c28 (diff)
downloadvim-git-bfcfd5784a2fe950d8e58d1d534bbbb4824524eb.tar.gz
patch 8.2.0447: terminal scroll tests fails on some systemsv8.2.0447
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)
Diffstat (limited to 'src/testdir/test_terminal.vim')
-rw-r--r--src/testdir/test_terminal.vim15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index f56c7facf..f3571d4e4 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -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))