Mercurial > vim
comparison src/testdir/runtest.vim @ 9748:5440f3442841 v7.4.2149
commit https://github.com/vim/vim/commit/7cba71d7e3576639679b6a3aedeeb1ac07f7f2f5
Author: Bram Moolenaar <Bram@vim.org>
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 02 Aug 2016 23:15:07 +0200 |
parents | 3e0ab13ddd12 |
children | 5534cfa2ec87 |
comparison
equal
deleted
inserted
replaced
9747:7ef0620bfed7 | 9748:5440f3442841 |
---|---|
101 endtry | 101 endtry |
102 | 102 |
103 if exists("*TearDown") | 103 if exists("*TearDown") |
104 call TearDown() | 104 call TearDown() |
105 endif | 105 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 | |
106 endfunc | 112 endfunc |
107 | 113 |
108 " Source the test script. First grab the file name, in case the script | 114 " Source the test script. First grab the file name, in case the script |
109 " navigates away. g:testname can be used by the tests. | 115 " navigates away. g:testname can be used by the tests. |
110 let g:testname = expand('%') | 116 let g:testname = expand('%') |