Bram Moolenaar | b5bf5b8 | 2004-12-24 14:35:23 +0000 | [diff] [blame] | 1 | Some tests for buffer-local autocommands |
| 2 | |
| 3 | STARTTEST |
| 4 | :so small.vim |
| 5 | :e xx |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | b5bf5b8 | 2004-12-24 14:35:23 +0000 | [diff] [blame] | 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 |