Problem: Test functions interfere with each other.
Solution: Cleanup tab pages, windows and buffers. Reset option.
endtry
endif
- " Close any extra windows and make the current one not modified.
+ " Close any extra tab pages and windows and make the current one not modified.
+ while tabpagenr('$') > 1
+ bwipe!
+ endwhile
+
while 1
let wincount = winnr('$')
if wincount == 1
break
endif
endwhile
+
+ " Wipe out all buffers except the current one, then wipe the current one.
+ for nr in range(1, bufnr('$'))
+ if nr != bufnr('%') && bufexists(nr)
+ exe nr . 'bwipe!'
+ endif
+ endfor
set nomodified
+ bwipe
endfunc
func AfterTheTest()
for file in files
call writefile(file, 'Xtest')
split Xtest
- call assert_equal(ft, &filetype)
+ call assert_equal(ft, &filetype, 'for text: ' . string(file))
bwipe!
endfor
endfor
enew!
let &cpoptions=save_copt
+ set nolisp
endfunc
func Test_close_on_quitpre()
" This once caused a crash
+ edit Xtest
new
only
set bufhidden=delete
while tabpagenr('$') > 1
bwipe!
endwhile
- 1b
+ buf Xtest
endfunc
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1222,
/**/
1221,
/**/