# HG changeset patch # User Christian Brabandt # Date 1470172507 -7200 # Node ID 5440f3442841cd78e49158dabac299c431758fe6 # Parent 7ef0620bfed7d3ffdc9e1e66baa207cdbaa3ef61 commit https://github.com/vim/vim/commit/7cba71d7e3576639679b6a3aedeeb1ac07f7f2f5 Author: Bram Moolenaar Date: Tue Aug 2 23:04:49 2016 +0200 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 --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -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 diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -203,7 +203,6 @@ func! Test_popup_complete() call feedkeys("aM\\\", '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\\\\\", 'tx') call assert_equal('December', getline(1)) - bwipe! iunmap endfunc diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2149, +/**/ 2148, /**/ 2147,