diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-26 20:51:43 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-26 20:51:43 +0100 |
commit | 72749f062f15c7147f512bc581695c25ad78fb4e (patch) | |
tree | bb9e01fbe6711c6159626b11bfe5e8099ba6cff7 /src/testdir/test_excmd.vim | |
parent | 83d4790a04780328c9c7ad22d18f404a27c11601 (diff) | |
download | vim-git-72749f062f15c7147f512bc581695c25ad78fb4e.tar.gz |
patch 8.2.0456: Test_confirm_cmd is flakyv8.2.0456
Problem: Test_confirm_cmd is flaky.
Solution: Add a term_wait() call. (closes #5854)
Diffstat (limited to 'src/testdir/test_excmd.vim')
-rw-r--r-- | src/testdir/test_excmd.vim | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/testdir/test_excmd.vim b/src/testdir/test_excmd.vim index 27fdd8835..755099c4e 100644 --- a/src/testdir/test_excmd.vim +++ b/src/testdir/test_excmd.vim @@ -242,6 +242,11 @@ func Test_confirm_cmd() 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,14 +256,12 @@ func Test_confirm_cmd() 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) - - call delete('foo') - call delete('bar') endfunc " Test for the :print command |