]> granicus.if.org Git - vim/commitdiff
patch 8.2.0438: terminal noblock test is very flaky on BSD v8.2.0438
authorBram Moolenaar <Bram@vim.org>
Mon, 23 Mar 2020 21:46:44 +0000 (22:46 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 23 Mar 2020 21:46:44 +0000 (22:46 +0100)
Problem:    Terminal noblock test is very flaky on BSD.
Solution:   Change WaitFor() to WaitForAssert() to be able to see why it
            failed.  Add a short wait in between sending keys.

src/testdir/test_terminal.vim
src/version.c

index 6d7c786155a2447ea5e14a421de5c68709891ed9..7e7aaff947f5b7fcd2fc6afe6b937f8d7fe8b63c 100644 (file)
@@ -675,13 +675,14 @@ func Test_terminal_noblock()
 
   for c in split('abcdefghijklmnopqrstuvwxyz', '\zs')
     call term_sendkeys(buf, 'echo ' . repeat(c, len) . "\<cr>")
+    call term_wait(buf, 1)
   endfor
   call term_sendkeys(buf, "echo done\<cr>")
 
   " On MS-Windows there is an extra empty line below "done".  Find "done" in
   " the last-but-one or the last-but-two line.
   let lnum = term_getsize(buf)[0] - 1
-  call WaitFor({-> term_getline(buf, lnum) =~ "done" || term_getline(buf, lnum - 1) =~ "done"}, 10000)
+  call WaitForAssert({-> assert_match('done', term_getline(buf, lnum - 1) .. '//' .. term_getline(buf, lnum))})
   let line = term_getline(buf, lnum)
   if line !~ 'done'
     let line = term_getline(buf, lnum - 1)
index eef374a673e99298923a5b002707280a046d92f9..82d93e529a276ff7b9f188ffa175d3102620a25d 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    438,
 /**/
     437,
 /**/