annotate src/testdir/test5.in @ 10668:6a252c6afd5b v8.0.0224

patch 8.0.0224: change to 'fileformats' from autocmd does not take effect commit https://github.com/vim/vim/commit/7a2699e868bca781e26b060a44fc714d87cfa4ba Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 23 21:31:09 2017 +0100 patch 8.0.0224: change to 'fileformats' from autocmd does not take effect Problem: When 'fileformats' is changed in a BufReadPre auto command, it does not take effect in readfile(). (Gary Johnson) Solution: Check the value of 'fileformats' after executing auto commands. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Mon, 23 Jan 2017 21:45:04 +0100
parents 3fc0f57ecb91
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 Test for autocommand that deletes the current buffer on BufLeave event.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 Also test deleting the last buffer, should give a new, empty buffer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 STARTTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 :so small.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 :au BufLeave Xxx bwipe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 /start of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 :.,/end of/w! Xxx " write test file Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 :sp Xxx " split to Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 :bwipe " delete buffer Xxx, now we're back here
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 G?this is a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 othis is some more text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 : " Append some text to this file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 :?start?,$w! test.out " Write current file contents
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 :bwipe test.out " delete alternate buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 :au bufleave test5.in bwipe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 :bwipe! " delete current buffer, get an empty one
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 ithis is another test line:w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 : " append an extra line to the output file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 :qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 start of test file Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 vim: set noai :
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 this is a test
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 this is a test
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 this is a test
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 this is a test
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 end of test file Xxx