annotate src/testdir/test53.in @ 8785:1cb59cd2d382 v7.4.1681

commit https://github.com/vim/vim/commit/ef9d9b94a8803c405884bb6914ed745ede57c596 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 28 22:44:50 2016 +0200 patch 7.4.1681 Problem: Coverity warns for fixed size buffer length (false positive). Solution: Add a check for the name length.
author Christian Brabandt <cb@256bit.org>
date Mon, 28 Mar 2016 22:45:08 +0200
parents 950e24f26ef8
children 847518911c0b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
853
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
1 Tests for string and html text objects. vim: set ft=vim :
12
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
2
19
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
3 Note that the end-of-line moves the cursor to the next test line.
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
4
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
5 Also test match() and matchstr()
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
6
5676
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
7 Also test the gn command and repeating it.
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
8
12
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
9 STARTTEST
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
10 :so small.vim
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
11 /^start:/
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
12 da"
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
13 0va'a'rx
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
14 02f`da`
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
15 0fXdi"
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
16 03f'vi'ry
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
17 :set quoteescape=+*-
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
18 di`
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
19 $F"va"oha"i"rz
853
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
20 :"
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
21 /^<begin
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
22 jfXdit
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
23 0fXdit
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
24 fXdat
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
25 0fXdat
6661
950e24f26ef8 updated for version 7.4.655
Bram Moolenaar <bram@vim.org>
parents: 6443
diff changeset
26 dit
853
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
27 :"
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
28 :put =matchstr(\"abcd\", \".\", 0, 2) " b
19
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
29 :put =matchstr(\"abcd\", \"..\", 0, 2) " bc
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
30 :put =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match)
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
31 :put =matchstr(\"abcd\", \".\", 0, -1) " a
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
32 :put =match(\"abcd\", \".\", 0, 5) " -1
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
33 :put =match(\"abcd\", \".\", 0, -1) " 0
5676
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
34 :put =match('abc', '.', 0, 1) " 0
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
35 :put =match('abc', '.', 0, 2) " 1
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
36 :put =match('abc', '.', 0, 3) " 2
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
37 :put =match('abc', '.', 0, 4) " -1
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
38 :put =match('abc', '.', 1, 1) " 1
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
39 :put =match('abc', '.', 2, 1) " 2
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
40 :put =match('abc', '.', 3, 1) " -1
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
41 :put =match('abc', '$', 0, 1) " 3
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
42 :put =match('abc', '$', 0, 2) " -1
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
43 :put =match('abc', '$', 1, 1) " 3
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
44 :put =match('abc', '$', 2, 1) " 3
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
45 :put =match('abc', '$', 3, 1) " 3
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
46 :put =match('abc', '$', 4, 1) " -1
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
47 :put =match('abc', '\zs', 0, 1) " 0
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
48 :put =match('abc', '\zs', 0, 2) " 1
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
49 :put =match('abc', '\zs', 0, 3) " 2
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
50 :put =match('abc', '\zs', 0, 4) " 3
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
51 :put =match('abc', '\zs', 0, 5) " -1
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
52 :put =match('abc', '\zs', 1, 1) " 1
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
53 :put =match('abc', '\zs', 2, 1) " 2
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
54 :put =match('abc', '\zs', 3, 1) " 3
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
55 :put =match('abc', '\zs', 4, 1) " -1
3701
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
56 /^foobar
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
57 gncsearchmatch/one\_s*two\_s
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
58 :1
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
59 gnd
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
60 /[a]bcdx
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
61 :1
3774
1810ee914648 updated for version 7.3.645
Bram Moolenaar <bram@vim.org>
parents: 3701
diff changeset
62 2gnd/join
1810ee914648 updated for version 7.3.645
Bram Moolenaar <bram@vim.org>
parents: 3701
diff changeset
63 /$
1810ee914648 updated for version 7.3.645
Bram Moolenaar <bram@vim.org>
parents: 3701
diff changeset
64 0gnd
1810ee914648 updated for version 7.3.645
Bram Moolenaar <bram@vim.org>
parents: 3701
diff changeset
65 /\>\zs
1810ee914648 updated for version 7.3.645
Bram Moolenaar <bram@vim.org>
parents: 3701
diff changeset
66 0gnd/^
1810ee914648 updated for version 7.3.645
Bram Moolenaar <bram@vim.org>
parents: 3701
diff changeset
67 gnd$h/\zs
3778
29fe4e5c1db1 updated for version 7.3.647
Bram Moolenaar <bram@vim.org>
parents: 3774
diff changeset
68 gnd/[u]niquepattern/s
29fe4e5c1db1 updated for version 7.3.647
Bram Moolenaar <bram@vim.org>
parents: 3774
diff changeset
69 vlgnd
3857
34aa94a421b7 updated for version 7.3.685
Bram Moolenaar <bram@vim.org>
parents: 3778
diff changeset
70 /mother
34aa94a421b7 updated for version 7.3.685
Bram Moolenaar <bram@vim.org>
parents: 3778
diff changeset
71 :set selection=exclusive
5064
8875401008da updated for version 7.3.1275
Bram Moolenaar <bram@vim.org>
parents: 3857
diff changeset
72 $cgNmongoose/i
8875401008da updated for version 7.3.1275
Bram Moolenaar <bram@vim.org>
parents: 3857
diff changeset
73 cgnj
5398
eb33cadafcab updated for version 7.4.050
Bram Moolenaar <bram@vim.org>
parents: 5064
diff changeset
74 :" Make sure there is no other match y uppercase.
eb33cadafcab updated for version 7.4.050
Bram Moolenaar <bram@vim.org>
parents: 5064
diff changeset
75 /x59
eb33cadafcab updated for version 7.4.050
Bram Moolenaar <bram@vim.org>
parents: 5064
diff changeset
76 gggnd
5676
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
77 :" test repeating dgn
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
78 /^Johnny
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
79 ggdgn.
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
80 :" test repeating gUgn
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
81 /^Depp
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
82 gggUgn.
6443
eb0fb921e197 updated for version 7.4.551
Bram Moolenaar <bram@vim.org>
parents: 5676
diff changeset
83 gg/a:0\@!\zs\d\+
eb0fb921e197 updated for version 7.4.551
Bram Moolenaar <bram@vim.org>
parents: 5676
diff changeset
84 nygnop
12
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
85 :/^start:/,/^end:/wq! test.out
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
86 ENDTEST
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
87
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
88 start: "wo\"rd\\" foo
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
89 'foo' 'bar' 'piep'
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
90 bla bla `quote` blah
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
91 out " in "noXno"
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
92 "'" 'blah' rep 'buh'
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
93 bla `s*`d-`+++`l**` b`la
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
94 voo "nah" sdf " asdf" sdf " sdf" sd
853
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
95
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
96 <begin>
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
97 -<b>asdf<i>Xasdf</i>asdf</b>-
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
98 -<b>asdX<i>a<i />sdf</i>asdf</b>-
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
99 -<b>asdf<i>Xasdf</i>asdf</b>-
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
100 -<b>asdX<i>as<b />df</i>asdf</b>-
6661
950e24f26ef8 updated for version 7.4.655
Bram Moolenaar <bram@vim.org>
parents: 6443
diff changeset
101 -<b>
950e24f26ef8 updated for version 7.4.655
Bram Moolenaar <bram@vim.org>
parents: 6443
diff changeset
102 innertext object
950e24f26ef8 updated for version 7.4.655
Bram Moolenaar <bram@vim.org>
parents: 6443
diff changeset
103 </b>
853
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
104 </begin>
3701
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
105 SEARCH:
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
106 foobar
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
107 one
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
108 two
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
109 abcdx | abcdx | abcdx
3774
1810ee914648 updated for version 7.3.645
Bram Moolenaar <bram@vim.org>
parents: 3701
diff changeset
110 join
1810ee914648 updated for version 7.3.645
Bram Moolenaar <bram@vim.org>
parents: 3701
diff changeset
111 lines
1810ee914648 updated for version 7.3.645
Bram Moolenaar <bram@vim.org>
parents: 3701
diff changeset
112 zero width pattern
1810ee914648 updated for version 7.3.645
Bram Moolenaar <bram@vim.org>
parents: 3701
diff changeset
113 delete first and last chars
3778
29fe4e5c1db1 updated for version 7.3.647
Bram Moolenaar <bram@vim.org>
parents: 3774
diff changeset
114 uniquepattern uniquepattern
3857
34aa94a421b7 updated for version 7.3.685
Bram Moolenaar <bram@vim.org>
parents: 3778
diff changeset
115 my very excellent mother just served us nachos
5064
8875401008da updated for version 7.3.1275
Bram Moolenaar <bram@vim.org>
parents: 3857
diff changeset
116 for (i=0; i<=10; i++)
6443
eb0fb921e197 updated for version 7.4.551
Bram Moolenaar <bram@vim.org>
parents: 5676
diff changeset
117 a:10
eb0fb921e197 updated for version 7.4.551
Bram Moolenaar <bram@vim.org>
parents: 5676
diff changeset
118
eb0fb921e197 updated for version 7.4.551
Bram Moolenaar <bram@vim.org>
parents: 5676
diff changeset
119 a:1
eb0fb921e197 updated for version 7.4.551
Bram Moolenaar <bram@vim.org>
parents: 5676
diff changeset
120
eb0fb921e197 updated for version 7.4.551
Bram Moolenaar <bram@vim.org>
parents: 5676
diff changeset
121 a:20
5398
eb33cadafcab updated for version 7.4.050
Bram Moolenaar <bram@vim.org>
parents: 5064
diff changeset
122 Y
eb33cadafcab updated for version 7.4.050
Bram Moolenaar <bram@vim.org>
parents: 5064
diff changeset
123 text
eb33cadafcab updated for version 7.4.050
Bram Moolenaar <bram@vim.org>
parents: 5064
diff changeset
124 Y
5676
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
125 --1
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
126 Johnny
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
127 --2
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
128 Johnny
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
129 --3
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
130 Depp
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
131 --4
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
132 Depp
9ac2fc63501d updated for version 7.4.184
Bram Moolenaar <bram@vim.org>
parents: 5398
diff changeset
133 --5
12
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
134 end: