1Test for autocommand that deletes the current buffer on BufLeave event.
2Also test deleting the last buffer, should give a new, empty buffer.
3
4STARTTEST
5:so small.vim
6:au BufLeave Xxx bwipe
7/start of
8:.,/end of/w! Xxx               " write test file Xxx
9:sp Xxx                         " split to Xxx
10:bwipe                          " delete buffer Xxx, now we're back here
11G?this is a
12othis is some more text
13:                               " Append some text to this file
14:?start?,$w! test.out           " Write current file contents
15:bwipe test.out                 " delete alternate buffer
16:au bufleave test5.in bwipe
17:bwipe!                         " delete current buffer, get an empty one
18ithis is another test line:w >>test.out
19:                               " append an extra line to the output file
20:qa!
21ENDTEST
22
23start of test file Xxx
24vim: set noai :
25	this is a test
26	this is a test
27	this is a test
28	this is a test
29end of test file Xxx
30