To: vim_dev@googlegroups.com Subject: Patch 8.2.1938 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1938 Problem: Wiping out a terminal buffer makes some tests fail. Solution: Do not wipe out the terminal buffer unless wanted. Files: src/testdir/term_util.vim, src/testdir/test_terminal.vim, src/testdir/test_terminal3.vim *** ../vim-8.2.1937/src/testdir/term_util.vim 2020-11-01 20:04:54.402959141 +0100 --- src/testdir/term_util.vim 2020-11-01 20:54:10.916402202 +0100 *************** *** 134,140 **** endfunc " Stop a Vim running in terminal buffer "buf". ! func StopVimInTerminal(buf) " Using a terminal to run Vim is always considered flaky. let g:test_is_flaky = 1 --- 134,140 ---- endfunc " Stop a Vim running in terminal buffer "buf". ! func StopVimInTerminal(buf, kill = 1) " Using a terminal to run Vim is always considered flaky. let g:test_is_flaky = 1 *************** *** 151,157 **** call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))}) " If the buffer still exists forcefully wipe it. ! if bufexists(a:buf) exe a:buf .. 'bwipe!' endif endfunc --- 151,157 ---- call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))}) " If the buffer still exists forcefully wipe it. ! if a:kill && bufexists(a:buf) exe a:buf .. 'bwipe!' endif endfunc *** ../vim-8.2.1937/src/testdir/test_terminal.vim 2020-10-28 20:19:56.380057057 +0100 --- src/testdir/test_terminal.vim 2020-11-01 20:52:06.644721095 +0100 *************** *** 1230,1236 **** call assert_fails("call term_dumpwrite(buf, '')", 'E482:') call assert_fails("call term_dumpwrite(buf, test_null_string())", 'E482:') call test_garbagecollect_now() ! call StopVimInTerminal(buf) call TermWait(buf) call assert_fails("call term_dumpwrite(buf, 'Xtest.dump')", 'E958:') call assert_fails('call term_sendkeys([], ":q\")', 'E745:') --- 1230,1236 ---- call assert_fails("call term_dumpwrite(buf, '')", 'E482:') call assert_fails("call term_dumpwrite(buf, test_null_string())", 'E482:') call test_garbagecollect_now() ! call StopVimInTerminal(buf, 0) call TermWait(buf) call assert_fails("call term_dumpwrite(buf, 'Xtest.dump')", 'E958:') call assert_fails('call term_sendkeys([], ":q\")', 'E745:') *** ../vim-8.2.1937/src/testdir/test_terminal3.vim 2020-09-05 15:05:26.363411078 +0200 --- src/testdir/test_terminal3.vim 2020-11-01 20:55:55.512131927 +0100 *************** *** 560,566 **** call TermWait(buf) call term_sendkeys(buf, ":q\") call StopVimInTerminal(buf) - exe buf . 'bwipe!' set splitright& only! endfunc --- 560,565 ---- *** ../vim-8.2.1937/src/version.c 2020-11-01 20:04:54.402959141 +0100 --- src/version.c 2020-11-01 20:52:57.452591049 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1938, /**/ -- I'm so disorganized my keyboard isn't even in alphabetical order! /// 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 ///