40
|
1 Some tests for buffer-local autocommands
|
|
2
|
|
3 STARTTEST
|
|
4 :so small.vim
|
|
5 :e xx
|
1709
|
6 :if has("vms")
|
|
7 : !del test.out.*
|
|
8 : au BufLeave <buffer> :!write sys$output "buffer-local autommand in %" > test.out
|
|
9 :else
|
|
10 : !rm -f test.out
|
|
11 : au BufLeave <buffer> :!echo buffer-local autommand in %>> test.out
|
|
12 :endif
|
40
|
13 :e somefile " here, autocommand for xx shall write test.out
|
|
14 : " but autocommand shall not apply to buffer named <buffer>
|
|
15 :bwipe xx " here, autocommand shall be auto-deleted
|
|
16 :e xx " nothing shall be written
|
|
17 :e somefile " nothing shall be written
|
|
18 :qa!
|
|
19 ENDTEST
|
|
20
|
|
21 start of test file xx
|
|
22 end of test file xx
|