patch 7.4.2149
Problem:    If a test leaves a window open a following test may fail.
Solution:   Always close extra windows after running a test.
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 7f77692..d7c0516 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -103,6 +103,12 @@
   if exists("*TearDown")
     call TearDown()
   endif
+
+  " Close any extra windows and make the current one not modified.
+  while winnr('$') > 1
+    bwipe!
+  endwhile
+  set nomodified
 endfunc
 
 " Source the test script.  First grab the file name, in case the script