diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-01 20:58:26 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-01 20:58:26 +0100 |
commit | a46765a79745ff27b4a44659fb8389519c961977 (patch) | |
tree | 4991ff111e70ee75dca668114ceeec4756299962 /src/testdir/term_util.vim | |
parent | 645cd3eb1fae784579fab11feea634bfaff9af49 (diff) | |
download | vim-git-a46765a79745ff27b4a44659fb8389519c961977.tar.gz |
patch 8.2.1938: wiping out a terminal buffer makes some tests failv8.2.1938
Problem: Wiping out a terminal buffer makes some tests fail.
Solution: Do not wipe out the terminal buffer unless wanted.
Diffstat (limited to 'src/testdir/term_util.vim')
-rw-r--r-- | src/testdir/term_util.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testdir/term_util.vim b/src/testdir/term_util.vim index c2a2c350c..cfc850ba0 100644 --- a/src/testdir/term_util.vim +++ b/src/testdir/term_util.vim @@ -134,7 +134,7 @@ func RunVimInTerminal(arguments, options) endfunc " Stop a Vim running in terminal buffer "buf". -func StopVimInTerminal(buf) +func StopVimInTerminal(buf, kill = 1) " Using a terminal to run Vim is always considered flaky. let g:test_is_flaky = 1 @@ -151,7 +151,7 @@ func StopVimInTerminal(buf) call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))}) " If the buffer still exists forcefully wipe it. - if bufexists(a:buf) + if a:kill && bufexists(a:buf) exe a:buf .. 'bwipe!' endif endfunc |