annotate src/testdir/test8.in @ 2004:9e554211caf5 v7.2.301

updated for version 7.2-301
author vimboss
date Tue, 17 Nov 2009 16:41:01 +0000
parents 3fc0f57ecb91
children 1899acc5aebd
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 BufWritePre autocommand that deletes or unloads the buffer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 STARTTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 :so small.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 :au BufWritePre Xxx1 bunload
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 :au BufWritePre Xxx2 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 A1:.,/end of/w! Xxx1 " write test file Xxx1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 $r2:.,/end of/w! Xxx2 " write test file Xxx2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 :e! Xxx2 " edit Xxx2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 :bdel test8.in " delete this file from the buffer list
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 :e Xxx1 " edit Xxx1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 :w " write it, will unload it and give an error msg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 :w! test.out " Write contents of this file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 :e! Xxx2 " start editing Xxx2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 :bwipe test.out " remove test.out from the buffer list
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 :w " write it, will delete the buffer and give an error msg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 :w >>test.out " Append contents of this file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 :qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 start of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 test
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 end of Xxx