comparison src/testdir/test_terminal.vim @ 15830:69b6cf55d9bb v8.1.0922

patch 8.1.0922: terminal scrollback test is flaky commit https://github.com/vim/vim/commit/96baf02aa87dc6ec43850c5617fe53061edd97bf Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 14 23:49:38 2019 +0100 patch 8.1.0922: terminal scrollback test is flaky Problem: Terminal scrollback test is flaky. Solution: Wait a bit before running the tail command.
author Bram Moolenaar <Bram@vim.org>
date Fri, 15 Feb 2019 00:00:05 +0100
parents 8f112782a2e9
children 85c94163c4ab
comparison
equal deleted inserted replaced
15829:5afbb791b840 15830:69b6cf55d9bb
309 endif 309 endif
310 310
311 call writefile(range(50), 'Xtext') 311 call writefile(range(50), 'Xtext')
312 call writefile([ 312 call writefile([
313 \ 'terminal', 313 \ 'terminal',
314 \ 'sleep 100m',
314 \ 'call feedkeys("tail -n 100 -f Xtext\<CR>", "xt")', 315 \ 'call feedkeys("tail -n 100 -f Xtext\<CR>", "xt")',
315 \ 'sleep 100m', 316 \ 'sleep 100m',
316 \ 'call feedkeys("\<C-W>N", "xt")', 317 \ 'call feedkeys("\<C-W>N", "xt")',
317 \ ], 'XTest_postponed') 318 \ ], 'XTest_postponed')
318 let buf = RunVimInTerminal('-S XTest_postponed', {}) 319 let buf = RunVimInTerminal('-S XTest_postponed', {})
319 " Check that the Xtext lines are displayed and in Terminal-Normal mode 320 " Check that the Xtext lines are displayed and in Terminal-Normal mode
320 call term_wait(buf) 321 call term_wait(buf)
321 " TODO: this sometimes fails 322 call VerifyScreenDump(buf, 'Test_terminal_01', {})
322 "call VerifyScreenDump(buf, 'Test_terminal_01', {})
323 323
324 silent !echo 'one more line' >>Xtext 324 silent !echo 'one more line' >>Xtext
325 " Sceen will not change, move cursor to get a different dump 325 " Sceen will not change, move cursor to get a different dump
326 call term_sendkeys(buf, "k") 326 call term_sendkeys(buf, "k")
327 call term_wait(buf) 327 call term_wait(buf)
328 " TODO: this sometimes fails 328 call VerifyScreenDump(buf, 'Test_terminal_02', {})
329 "call VerifyScreenDump(buf, 'Test_terminal_02', {})
330 329
331 " Back to Terminal-Job mode, text will scroll and show the extra line. 330 " Back to Terminal-Job mode, text will scroll and show the extra line.
332 call term_sendkeys(buf, "a") 331 call term_sendkeys(buf, "a")
333 call term_wait(buf) 332 call term_wait(buf)
334 " TODO: this sometimes fails 333 call VerifyScreenDump(buf, 'Test_terminal_03', {})
335 "call VerifyScreenDump(buf, 'Test_terminal_03', {})
336 334
337 call term_wait(buf) 335 call term_wait(buf)
338 call term_sendkeys(buf, "\<C-C>") 336 call term_sendkeys(buf, "\<C-C>")
339 call term_wait(buf) 337 call term_wait(buf)
340 call term_sendkeys(buf, "exit\<CR>") 338 call term_sendkeys(buf, "exit\<CR>")