• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisionbde8020fb283cfc37be29f365255a741e07a2627 (tree)
Zeit2020-03-27 05:00:04
AutorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

patch 8.2.0456: Test_confirm_cmd is flaky

Commit: https://github.com/vim/vim/commit/72749f062f15c7147f512bc581695c25ad78fb4e
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 26 20:51:43 2020 +0100

patch 8.2.0456: Test_confirm_cmd is flaky
Problem: Test_confirm_cmd is flaky.
Solution: Add a term_wait() call. (closes https://github.com/vim/vim/issues/5854)

Ändern Zusammenfassung

Diff

diff -r ab0a91ba7a13 -r bde8020fb283 src/testdir/test_excmd.vim
--- a/src/testdir/test_excmd.vim Thu Mar 26 20:45:04 2020 +0100
+++ b/src/testdir/test_excmd.vim Thu Mar 26 21:00:04 2020 +0100
@@ -242,6 +242,11 @@
242242 call assert_equal(['foo4'], readfile('foo'))
243243 call assert_equal(['bar2'], readfile('bar'))
244244
245+ call delete('foo')
246+ call delete('bar')
247+endfunc
248+
249+func Test_confirm_cmd_cancel()
245250 " Test for closing a window with a modified buffer
246251 let buf = RunVimInTerminal('', {'rows': 20})
247252 call term_sendkeys(buf, ":set nomore\n")
@@ -251,14 +256,12 @@
251256 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$',
252257 \ term_getline(buf, 20))}, 1000)
253258 call term_sendkeys(buf, "C")
259+ call term_wait(buf, 50)
254260 call term_sendkeys(buf, ":confirm close\n")
255261 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$',
256262 \ term_getline(buf, 20))}, 1000)
257263 call term_sendkeys(buf, "N")
258264 call StopVimInTerminal(buf)
259-
260- call delete('foo')
261- call delete('bar')
262265 endfunc
263266
264267 " Test for the :print command
diff -r ab0a91ba7a13 -r bde8020fb283 src/version.c
--- a/src/version.c Thu Mar 26 20:45:04 2020 +0100
+++ b/src/version.c Thu Mar 26 21:00:04 2020 +0100
@@ -739,6 +739,8 @@
739739 static int included_patches[] =
740740 { /* Add new patch number below this line */
741741 /**/
742+ 456,
743+/**/
742744 455,
743745 /**/
744746 454,
Show on old repository browser