Patch 8.2.2708 Problem: Test sometimes fails waiting for shell in terminal. Solution: Use WaitForAssert() so we can see the actual job status. Use Run_shell_in_terminal(). Files: src/testdir/term_util.vim, src/testdir/test_mksession.vim
*** ../vim-8.2.2707/src/testdir/term_util.vim 2021-02-14 13:17:16.992007963 +0100 --- src/testdir/term_util.vim 2021-04-04 15:28:20.889158957 +0200 *************** *** 23,29 **** func StopShellInTerminal(buf) call term_sendkeys(a:buf, "exit\r") let job = term_getjob(a:buf) ! call WaitFor({-> job_status(job) == "dead"}) endfunc " Wrapper around term_wait() to allow more time for re-runs of flaky tests --- 23,29 ---- func StopShellInTerminal(buf) call term_sendkeys(a:buf, "exit\r") let job = term_getjob(a:buf) ! call WaitForAssert({-> assert_equal("dead", job_status(job))}) endfunc " Wrapper around term_wait() to allow more time for re-runs of flaky tests *************** *** 160,166 **** " number. func Run_shell_in_terminal(options) if has('win32') ! let buf = term_start([&shell,'/k'], a:options) else let buf = term_start(&shell, a:options) endif --- 160,166 ---- " number. func Run_shell_in_terminal(options) if has('win32') ! let buf = term_start([&shell, '/k'], a:options) else let buf = term_start(&shell, a:options) endif *** ../vim-8.2.2707/src/testdir/test_mksession.vim 2021-04-01 13:39:47.504992915 +0200 --- src/testdir/test_mksession.vim 2021-04-04 15:26:34.261439924 +0200 *************** *** 392,398 **** func Test_mksession_terminal_no_restore_funcarg() CheckFeature terminal ! call term_start(&shell, {'norestore': 1}) mksession! Xtest_mks.out let lines = readfile('Xtest_mks.out') let term_cmd = '' --- 392,398 ---- func Test_mksession_terminal_no_restore_funcarg() CheckFeature terminal ! let buf = Run_shell_in_terminal({'norestore': 1}) mksession! Xtest_mks.out let lines = readfile('Xtest_mks.out') let term_cmd = '' *************** *** 402,408 **** endif endfor ! call StopShellInTerminal(bufnr('%')) call delete('Xtest_mks.out') endfunc --- 402,408 ---- endif endfor ! call StopShellInTerminal(buf) call delete('Xtest_mks.out') endfunc *** ../vim-8.2.2707/src/version.c 2021-04-04 15:05:16.784805937 +0200 --- src/version.c 2021-04-04 15:23:34.317914103 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2708, /**/ -- Keyboard not found. Think ENTER to continue. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202104041329.134DTULg2789325%40masaka.moolenaar.net.