summaryrefslogtreecommitdiff
path: root/src/testdir/runtest.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/runtest.vim')
-rw-r--r--src/testdir/runtest.vim18
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()