Mercurial > vim
comparison src/testdir/test_terminal.vim @ 19781:cadb4c1bee6e v8.2.0447
patch 8.2.0447: terminal scroll tests fails on some systems
Commit: https://github.com/vim/vim/commit/bfcfd5784a2fe950d8e58d1d534bbbb4824524eb
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 25 21:27:22 2020 +0100
patch 8.2.0447: terminal scroll tests fails on some systems
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 25 Mar 2020 21:30:04 +0100 |
parents | 4e843fc8772f |
children | d73d982499ae |
comparison
equal
deleted
inserted
replaced
19780:6f239a6d3b79 | 19781:cadb4c1bee6e |
---|---|
296 let buf = term_start(cmd) | 296 let buf = term_start(cmd) |
297 | 297 |
298 let job = term_getjob(buf) | 298 let job = term_getjob(buf) |
299 call WaitForAssert({-> assert_equal("dead", job_status(job))}) | 299 call WaitForAssert({-> assert_equal("dead", job_status(job))}) |
300 call term_wait(buf) | 300 call term_wait(buf) |
301 if has('win32') | 301 |
302 " TODO: this should not be needed | 302 " wait until the scrolling stops |
303 sleep 100m | 303 while 1 |
304 endif | 304 let scrolled = buf->term_getscrolled() |
305 | 305 sleep 20m |
306 let scrolled = buf->term_getscrolled() | 306 if scrolled == buf->term_getscrolled() |
307 call assert_equal(scrolled, term_getscrolled(buf)) | 307 break |
308 endif | |
309 endwhile | |
310 | |
308 call assert_equal('1', getline(1)) | 311 call assert_equal('1', getline(1)) |
309 call assert_equal('1', term_getline(buf, 1 - scrolled)) | 312 call assert_equal('1', term_getline(buf, 1 - scrolled)) |
310 call assert_equal('49', getline(49)) | 313 call assert_equal('49', getline(49)) |
311 call assert_equal('49', term_getline(buf, 49 - scrolled)) | 314 call assert_equal('49', term_getline(buf, 49 - scrolled)) |
312 call assert_equal('200', getline(200)) | 315 call assert_equal('200', getline(200)) |