diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-10-27 00:55:04 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-10-27 00:55:04 +0200 |
commit | cf1ba35fc2ebd41b9a7738bbd1f026f5311560aa (patch) | |
tree | c485902b799a521cf8675a11b8ab73a7745c86eb /src/testdir/runtest.vim | |
parent | 9ad89c6c4f89cd710d8244d8010b8b0ae30ba79d (diff) | |
download | vim-git-cf1ba35fc2ebd41b9a7738bbd1f026f5311560aa.tar.gz |
patch 8.0.1224: still interference between test functionsv8.0.1224
Problem: Still interference between test functions.
Solution: Clear autocommands. Wipe all buffers. Fix tests that depend on a
specific start context.
Diffstat (limited to 'src/testdir/runtest.vim')
-rw-r--r-- | src/testdir/runtest.vim | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim index d1593825a..a35944830 100644 --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -99,6 +99,10 @@ func RunTheTest(test) " Clear any overrides. call test_override('ALL', 0) + " Some tests wipe out buffers. To be consistent, always wipe out all + " buffers. + %bwipe! + if exists("*SetUp") try call SetUp() @@ -133,9 +137,12 @@ func RunTheTest(test) endtry endif + " Clear any autocommands + au! + " Close any extra tab pages and windows and make the current one not modified. while tabpagenr('$') > 1 - bwipe! + quit! endwhile while 1 @@ -150,15 +157,6 @@ func RunTheTest(test) break endif endwhile - - " Wipe out all buffers except the current one, then wipe the current one. - for nr in range(1, bufnr('$')) - if nr != bufnr('%') && bufexists(nr) - exe nr . 'bwipe!' - endif - endfor - set nomodified - bwipe endfunc func AfterTheTest() |