]> granicus.if.org Git - vim/commitdiff
patch 8.2.0390: terminal postponed scrollback test is flaky v8.2.0390
authorBram Moolenaar <Bram@vim.org>
Sun, 15 Mar 2020 19:33:40 +0000 (20:33 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 15 Mar 2020 19:33:40 +0000 (20:33 +0100)
Problem:    Terminal postponed scrollback test is flaky.
Solution:   Add delay in between sending keys.  Rename dump files.

src/testdir/dumps/Test_terminal_scrollback_1.dump [moved from src/testdir/dumps/Test_terminal_01.dump with 100% similarity]
src/testdir/dumps/Test_terminal_scrollback_2.dump [moved from src/testdir/dumps/Test_terminal_02.dump with 100% similarity]
src/testdir/dumps/Test_terminal_scrollback_3.dump [moved from src/testdir/dumps/Test_terminal_03.dump with 100% similarity]
src/testdir/test_terminal.vim
src/version.c

index d763f78a7d4e6a365e8c81b770b74e3a9a949135..7f057e2a5722c80a0ee6a8002a4c68f07c63905f 100644 (file)
@@ -352,22 +352,24 @@ func Test_terminal_postponed_scrollback()
        \ ], 'XTest_postponed')
   let buf = RunVimInTerminal('-S XTest_postponed', {})
   " Check that the Xtext lines are displayed and in Terminal-Normal mode
-  call VerifyScreenDump(buf, 'Test_terminal_01', {})
+  call VerifyScreenDump(buf, 'Test_terminal_scrollback_1', {})
 
   silent !echo 'one more line' >>Xtext
   " Screen will not change, move cursor to get a different dump
   call term_sendkeys(buf, "k")
-  call VerifyScreenDump(buf, 'Test_terminal_02', {})
+  call VerifyScreenDump(buf, 'Test_terminal_scrollback_2', {})
 
   " Back to Terminal-Job mode, text will scroll and show the extra line.
   call term_sendkeys(buf, "a")
-  call VerifyScreenDump(buf, 'Test_terminal_03', {})
+  call VerifyScreenDump(buf, 'Test_terminal_scrollback_3', {})
 
-  call term_wait(buf)
+  " stop "tail -f"
   call term_sendkeys(buf, "\<C-C>")
-  call term_wait(buf)
+  call term_wait(buf, 50)
+  " stop shell
   call term_sendkeys(buf, "exit\<CR>")
-  call term_wait(buf)
+  call term_wait(buf, 100)
+  " close terminal window
   let tsk_ret = term_sendkeys(buf, ":q\<CR>")
 
   " check type of term_sendkeys() return value
index fede5ead8df27dc08bf0cfe8317ffe2039a321cf..33bdb39bb62aed334d4745e983a1efa1d480cae5 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    390,
 /**/
     389,
 /**/