Skip to content

Commit 7cba71d

Browse files
committed
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.
1 parent edf634e commit 7cba71d

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/testdir/runtest.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ function RunTheTest(test)
103103
if exists("*TearDown")
104104
call TearDown()
105105
endif
106+
107+
" Close any extra windows and make the current one not modified.
108+
while winnr('$') > 1
109+
bwipe!
110+
endwhile
111+
set nomodified
106112
endfunc
107113

108114
" Source the test script. First grab the file name, in case the script

src/testdir/test_popup.vim

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ func! Test_popup_complete()
203203
call feedkeys("aM\<f5>\<enter>\<esc>", 'tx')
204204
call assert_equal(["March", "M", "March"], getline(1,4))
205205
%d
206-
bwipe!
207206
endfu
208207

209208

@@ -233,7 +232,6 @@ func! Test_popup_completion_insertmode()
233232
call feedkeys("a\<f5>\<c-p>\<c-p>\<enter>\<esc>", 'tx')
234233
call assert_equal('December', getline(1))
235234

236-
bwipe!
237235
iunmap <F5>
238236
endfunc
239237

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,8 @@ static char *(features[]) =
763763

764764
static int included_patches[] =
765765
{ /* Add new patch number below this line */
766+
/**/
767+
2149,
766768
/**/
767769
2148,
768770
/**/

0 commit comments

Comments
 (0)