diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-02 23:04:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-02 23:04:49 +0200 |
commit | 7cba71d7e3576639679b6a3aedeeb1ac07f7f2f5 (patch) | |
tree | 2879665a7865d8257a064f84a8df2d1b2fda961c | |
parent | edf634e0f1985c5ea1afb5b480b47a44cabbce34 (diff) | |
download | vim-git-7cba71d7e3576639679b6a3aedeeb1ac07f7f2f5.tar.gz |
patch 7.4.2149v7.4.2149
Problem: If a test leaves a window open a following test may fail.
Solution: Always close extra windows after running a test.
-rw-r--r-- | src/testdir/runtest.vim | 6 | ||||
-rw-r--r-- | src/testdir/test_popup.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim index 7f7769288..d7c051680 100644 --- 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 index d5f50ca88..708739cb2 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -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 diff --git a/src/version.c b/src/version.c index eb2e7f691..f6d56d1d3 100644 --- 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, |