To: vim_dev@googlegroups.com Subject: Patch 8.2.0456 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0456 Problem: Test_confirm_cmd is flaky. Solution: Add a term_wait() call. (closes #5854) Files: src/testdir/test_excmd.vim *** ../vim-8.2.0455/src/testdir/test_excmd.vim 2020-03-23 20:54:28.220520961 +0100 --- src/testdir/test_excmd.vim 2020-03-26 20:49:50.440649208 +0100 *************** *** 242,247 **** --- 242,252 ---- call assert_equal(['foo4'], readfile('foo')) call assert_equal(['bar2'], readfile('bar')) + call delete('foo') + call delete('bar') + endfunc + + func Test_confirm_cmd_cancel() " Test for closing a window with a modified buffer let buf = RunVimInTerminal('', {'rows': 20}) call term_sendkeys(buf, ":set nomore\n") *************** *** 251,264 **** call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', \ term_getline(buf, 20))}, 1000) call term_sendkeys(buf, "C") call term_sendkeys(buf, ":confirm close\n") call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', \ term_getline(buf, 20))}, 1000) call term_sendkeys(buf, "N") call StopVimInTerminal(buf) - - call delete('foo') - call delete('bar') endfunc " Test for the :print command --- 256,267 ---- call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', \ term_getline(buf, 20))}, 1000) call term_sendkeys(buf, "C") + call term_wait(buf, 50) call term_sendkeys(buf, ":confirm close\n") call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', \ term_getline(buf, 20))}, 1000) call term_sendkeys(buf, "N") call StopVimInTerminal(buf) endfunc " Test for the :print command *** ../vim-8.2.0455/src/version.c 2020-03-26 20:33:20.999063758 +0100 --- src/version.c 2020-03-26 20:45:24.217400894 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 456, /**/ -- ARTHUR: Bloody peasant! DENNIS: Oh, what a give away. Did you hear that, did you hear that, eh? That's what I'm on about -- did you see him repressing me, you saw it didn't you? 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 ///