Mercurial > vim
comparison src/testdir/test_terminal.vim @ 19667:a088571e1d9d v8.2.0390
patch 8.2.0390: terminal postponed scrollback test is flaky
Commit: https://github.com/vim/vim/commit/ddbfe238a50dc846f2f722e9d870fc0dff5a2764
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 15 20:33:40 2020 +0100
patch 8.2.0390: terminal postponed scrollback test is flaky
Problem: Terminal postponed scrollback test is flaky.
Solution: Add delay in between sending keys. Rename dump files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 15 Mar 2020 20:45:04 +0100 |
parents | 283c8bc6a8e2 |
children | 9199f34d838e |
comparison
equal
deleted
inserted
replaced
19666:d758539f6e00 | 19667:a088571e1d9d |
---|---|
350 \ 'sleep 100m', | 350 \ 'sleep 100m', |
351 \ 'call feedkeys("\<C-W>N", "xt")', | 351 \ 'call feedkeys("\<C-W>N", "xt")', |
352 \ ], 'XTest_postponed') | 352 \ ], 'XTest_postponed') |
353 let buf = RunVimInTerminal('-S XTest_postponed', {}) | 353 let buf = RunVimInTerminal('-S XTest_postponed', {}) |
354 " Check that the Xtext lines are displayed and in Terminal-Normal mode | 354 " Check that the Xtext lines are displayed and in Terminal-Normal mode |
355 call VerifyScreenDump(buf, 'Test_terminal_01', {}) | 355 call VerifyScreenDump(buf, 'Test_terminal_scrollback_1', {}) |
356 | 356 |
357 silent !echo 'one more line' >>Xtext | 357 silent !echo 'one more line' >>Xtext |
358 " Screen will not change, move cursor to get a different dump | 358 " Screen will not change, move cursor to get a different dump |
359 call term_sendkeys(buf, "k") | 359 call term_sendkeys(buf, "k") |
360 call VerifyScreenDump(buf, 'Test_terminal_02', {}) | 360 call VerifyScreenDump(buf, 'Test_terminal_scrollback_2', {}) |
361 | 361 |
362 " Back to Terminal-Job mode, text will scroll and show the extra line. | 362 " Back to Terminal-Job mode, text will scroll and show the extra line. |
363 call term_sendkeys(buf, "a") | 363 call term_sendkeys(buf, "a") |
364 call VerifyScreenDump(buf, 'Test_terminal_03', {}) | 364 call VerifyScreenDump(buf, 'Test_terminal_scrollback_3', {}) |
365 | 365 |
366 call term_wait(buf) | 366 " stop "tail -f" |
367 call term_sendkeys(buf, "\<C-C>") | 367 call term_sendkeys(buf, "\<C-C>") |
368 call term_wait(buf) | 368 call term_wait(buf, 50) |
369 " stop shell | |
369 call term_sendkeys(buf, "exit\<CR>") | 370 call term_sendkeys(buf, "exit\<CR>") |
370 call term_wait(buf) | 371 call term_wait(buf, 100) |
372 " close terminal window | |
371 let tsk_ret = term_sendkeys(buf, ":q\<CR>") | 373 let tsk_ret = term_sendkeys(buf, ":q\<CR>") |
372 | 374 |
373 " check type of term_sendkeys() return value | 375 " check type of term_sendkeys() return value |
374 echo type(tsk_ret) | 376 echo type(tsk_ret) |
375 | 377 |