annotate src/testdir/test40.in @ 2232:2e6906bbc5f4 vim73

A few more fixes for undo file. Split test in two parts so that it doesn't fail with tiny features.
author Bram Moolenaar <bram@vim.org>
date Sun, 30 May 2010 13:26:21 +0200
parents 3fc0f57ecb91
children ad7b6062a7f4
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 "*Cmd" autocommands
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 :/^start/,$w! Xxx " write lines below to Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 :au BufReadCmd testA 0r Xxx|$del
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 :e testA " will read text of Xxd instead
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 :au BufWriteCmd testA call append(line("$"), "write")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 :w " will append a line to the file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 :r testA " should not read anything
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 : " now we have:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 : " 1 start of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 : " 2 test40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 : " 3 end of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 : " 4 write
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 :au FileReadCmd testB '[r Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 :2r testB " will read Xxx below line 2 instead
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 : " 1 start of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 : " 2 test40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 : " 3 start of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 : " 4 test40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 : " 5 end of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 : " 6 end of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 : " 7 write
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 :au FileWriteCmd testC '[,']copy $
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 4GA1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 :4,5w testC " will copy lines 4 and 5 to the end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 :r testC " should not read anything
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 : " 1 start of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 : " 2 test40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 : " 3 start of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 : " 4 test401
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 : " 5 end of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 : " 6 end of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 : " 7 write
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 : " 8 test401
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 : " 9 end of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 :au FILEAppendCmd testD '[,']w! test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 :w >>testD " will write all lines to test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 :$r testD " should not read anything
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 :$w >>test.out " append "end of Xxx" to test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 :au BufReadCmd testE 0r test.out|$del
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 :sp testE " split window with test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 5Goasdf:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 :au BufWriteCmd testE w! test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 :wall " will write other window to test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 : " 1 start of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 : " 2 test40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 : " 3 start of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 : " 4 test401
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 : " 5 end of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 : " 6 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 : " 7 end of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 : " 8 write
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 : " 9 test401
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 : " 10 end of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 : " 11 end of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 :qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 start of Xxx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 test40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 end of Xxx