aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-12-28 14:54:30 -0500
committerJames McCoy <jamessan@jamessan.com>2016-12-28 14:57:22 -0500
commite00b02429520ad2c8f087024900c8adce5b42d46 (patch)
treeece8958fb3ad99276e6b2848bd8e949a9f0d1c30
parent9009c20edb066811417aa1a044e643f1d4050f7c (diff)
downloadrneovim-e00b02429520ad2c8f087024900c8adce5b42d46.tar.gz
rneovim-e00b02429520ad2c8f087024900c8adce5b42d46.tar.bz2
rneovim-e00b02429520ad2c8f087024900c8adce5b42d46.zip
vim-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. https://github.com/vim/vim/commit/7cba71d7e3576639679b6a3aedeeb1ac07f7f2f5 Apply the runtest.vim changes that were missing from 4431975210b58c6b0403ee50172bad3c8729bbb2
-rw-r--r--src/nvim/testdir/runtest.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim
index 931013877d..20863bbaf3 100644
--- a/src/nvim/testdir/runtest.vim
+++ b/src/nvim/testdir/runtest.vim
@@ -86,6 +86,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