annotate src/testdir/test40.in @ 9773:908a212d6d44

Added tag v7.4.2161 for changeset 5602912113039d0f1a725bfac7bf856077469e02
author Christian Brabandt <cb@256bit.org>
date Fri, 05 Aug 2016 23:00:07 +0200
parents ad7b6062a7f4
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 "*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
4131
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
6 :au BufReadCmd XtestA 0r Xxx|$del
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
7 :e XtestA " will read text of Xxd instead
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
8 :au BufWriteCmd XtestA call append(line("$"), "write")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 :w " will append a line to the file
4131
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
10 :r XtestA " should not read anything
7
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
4131
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
16 :au FileReadCmd XtestB '[r Xxx
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
17 :2r XtestB " will read Xxx below line 2 instead
7
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
4131
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
25 :au FileWriteCmd XtestC '[,']copy $
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 4GA1
4131
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
27 :4,5w XtestC " will copy lines 4 and 5 to the end
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
28 :r XtestC " should not read anything
7
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
4131
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
38 :au FILEAppendCmd XtestD '[,']w! test.out
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
39 :w >>XtestD " will write all lines to test.out
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
40 :$r XtestD " should not read anything
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 :$w >>test.out " append "end of Xxx" to test.out
4131
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
42 :au BufReadCmd XtestE 0r test.out|$del
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
43 :sp XtestE " split window with test.out
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 5Goasdf:"
4131
ad7b6062a7f4 updated for version 7.3.818
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
45 :au BufWriteCmd XtestE w! test.out
7
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