summaryrefslogtreecommitdiffstats
path: root/src/testdir/term_util.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-01 20:04:57 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-01 20:04:57 +0100
commit645cd3eb1fae784579fab11feea634bfaff9af49 (patch)
tree56b2d2cba7c0604c5bc0e0d8a923aebb2f3891b4 /src/testdir/term_util.vim
parent388908352f88e7391accb3545b082db0fc89d9f7 (diff)
patch 8.2.1937: Vim9: test for confirm modifier fails in some situationsv8.2.1937
Problem: Vim9: test for confirm modifier fails in some situations. Solution: Add a short wait. Handle failure better.
Diffstat (limited to 'src/testdir/term_util.vim')
-rw-r--r--src/testdir/term_util.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/testdir/term_util.vim b/src/testdir/term_util.vim
index 53735c8d33..c2a2c350cd 100644
--- a/src/testdir/term_util.vim
+++ b/src/testdir/term_util.vim
@@ -147,8 +147,13 @@ func StopVimInTerminal(buf)
" Wait for all the pending updates to terminal to complete
call TermWait(a:buf)
+ " Wait for the terminal to end.
call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))})
- only!
+
+ " If the buffer still exists forcefully wipe it.
+ if bufexists(a:buf)
+ exe a:buf .. 'bwipe!'
+ endif
endfunc
" Open a terminal with a shell, assign the job to g:job and return the buffer