To: vim_dev@googlegroups.com Subject: Patch 8.2.0438 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0438 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. Files: src/testdir/test_terminal.vim *** ../vim-8.2.0437/src/testdir/test_terminal.vim 2020-03-23 19:28:40.599056151 +0100 --- src/testdir/test_terminal.vim 2020-03-23 22:44:19.422481762 +0100 *************** *** 675,687 **** for c in split('abcdefghijklmnopqrstuvwxyz', '\zs') call term_sendkeys(buf, 'echo ' . repeat(c, len) . "\") endfor call term_sendkeys(buf, "echo done\") " 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) let line = term_getline(buf, lnum) if line !~ 'done' let line = term_getline(buf, lnum - 1) --- 675,688 ---- for c in split('abcdefghijklmnopqrstuvwxyz', '\zs') call term_sendkeys(buf, 'echo ' . repeat(c, len) . "\") + call term_wait(buf, 1) endfor call term_sendkeys(buf, "echo done\") " 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 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) *** ../vim-8.2.0437/src/version.c 2020-03-23 22:17:08.535747168 +0100 --- src/version.c 2020-03-23 22:45:58.654183083 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 438, /**/ -- GUARD #2: It could be carried by an African swallow! GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow, that's my point. GUARD #2: Oh, yeah, I agree with that... The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///