To: vim_dev@googlegroups.com Subject: Patch 8.2.0811 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0811 Problem: Terminal keycode test is flaky. Solution: Use WaitForAssert() Files: src/testdir/test_terminal.vim *** ../vim-8.2.0810/src/testdir/test_terminal.vim 2020-05-22 13:33:58.203383951 +0200 --- src/testdir/test_terminal.vim 2020-05-22 14:43:18.425961839 +0200 *************** *** 2493,2498 **** --- 2493,2499 ---- call term_sendkeys(buf, ":call OpenTerm(1)\") call TermWait(buf, 150) call term_sendkeys(buf, ":set hlsearch\") + call TermWait(buf, 100) call term_sendkeys(buf, "/edit\") call VerifyScreenDump(buf, 'Test_terminal_popup_3', {}) *************** *** 2517,2523 **** call TermWait(buf, 50) call term_sendkeys(buf, ":q\") ! call TermWait(buf, 100) " wait for terminal to vanish call StopVimInTerminal(buf) call delete('Xtext') --- 2518,2524 ---- call TermWait(buf, 50) call term_sendkeys(buf, ":q\") ! call TermWait(buf, 150) " wait for terminal to vanish call StopVimInTerminal(buf) call delete('Xtext') *************** *** 2704,2711 **** call term_sendkeys(buf, "i") for i in range(len(keys)) call term_sendkeys(buf, "\\" .. keys[i]) ! call term_wait(buf) ! call assert_equal(output[i], term_getline(buf, 1)) endfor let keypad_keys = ["\", "\", "\", "\", "\", "\", --- 2705,2711 ---- call term_sendkeys(buf, "i") for i in range(len(keys)) call term_sendkeys(buf, "\\" .. keys[i]) ! call WaitForAssert({-> assert_equal(output[i], term_getline(buf, 1))}) endfor let keypad_keys = ["\", "\", "\", "\", "\", "\", *************** *** 2720,2732 **** continue endif call term_sendkeys(buf, "\" .. keypad_keys[i]) ! call term_wait(buf) ! call assert_equal(keypad_output[i], term_getline(buf, 1)) endfor call feedkeys("\\\one\.two", 'xt') ! call term_wait(buf) ! call assert_equal('two', term_getline(buf, 1)) call StopVimInTerminal(buf) endfunc --- 2720,2730 ---- continue endif call term_sendkeys(buf, "\" .. keypad_keys[i]) ! call WaitForAssert({-> assert_equal(keypad_output[i], term_getline(buf, 1))}) endfor call feedkeys("\\\one\.two", 'xt') ! call WaitForAssert({-> assert_equal('two', term_getline(buf, 1))}) call StopVimInTerminal(buf) endfunc *** ../vim-8.2.0810/src/version.c 2020-05-22 14:10:33.791770351 +0200 --- src/version.c 2020-05-22 14:36:03.800096628 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 811, /**/ -- Send $25.00 for handy leaflet on how to make money by selling leaflets /// 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 ///