]> granicus.if.org Git - vim/commitdiff
patch 7.4.2149 v7.4.2149
authorBram Moolenaar <Bram@vim.org>
Tue, 2 Aug 2016 21:04:49 +0000 (23:04 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 2 Aug 2016 21:04:49 +0000 (23:04 +0200)
Problem:    If a test leaves a window open a following test may fail.
Solution:   Always close extra windows after running a test.

src/testdir/runtest.vim
src/testdir/test_popup.vim
src/version.c

index 7f77692886cb2cec1011a9675617c352a627b1d5..d7c051680320913eae50e0081cefd7e11f88faa0 100644 (file)
@@ -103,6 +103,12 @@ function RunTheTest(test)
   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
index d5f50ca8893599631906c9f99213133900e0ccec..708739cb229b2f078403599eba679c63874f7b62 100644 (file)
@@ -203,7 +203,6 @@ func! Test_popup_complete()
   call feedkeys("aM\<f5>\<enter>\<esc>", 'tx')
   call assert_equal(["March", "M", "March"], getline(1,4))
   %d
-  bwipe!
 endfu
 
 
@@ -233,7 +232,6 @@ func! Test_popup_completion_insertmode()
   call feedkeys("a\<f5>\<c-p>\<c-p>\<enter>\<esc>", 'tx')
   call assert_equal('December', getline(1))
 
-  bwipe!
   iunmap <F5>
 endfunc
 
index eb2e7f69117f8f3b8b27ff8e071145f2f6a740c0..f6d56d1d3c2b3374c995fbe5b48255a200256eb6 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2149,
 /**/
     2148,
 /**/