annotate src/testdir/test53.in @ 3701:9f48a5432997 v7.3.610

updated for version 7.3.610 Problem: Cannot operate on the text that a search pattern matches. Solution: Add the "gn" and "gN" commands. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Wed, 25 Jul 2012 15:06:34 +0200
parents d10fbefd3bc1
children 1810ee914648
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
12
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
7 STARTTEST
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
8 :so small.vim
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
9 /^start:/
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
10 da"
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
11 0va'a'rx
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
12 02f`da`
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
13 0fXdi"
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
14 03f'vi'ry
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
15 :set quoteescape=+*-
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
16 di`
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
17 $F"va"oha"i"rz
853
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
18 :"
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
19 /^<begin
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
20 jfXdit
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
21 0fXdit
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
22 fXdat
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
23 0fXdat
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
24 :"
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
25 :put =matchstr(\"abcd\", \".\", 0, 2) " b
19
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
26 :put =matchstr(\"abcd\", \"..\", 0, 2) " bc
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
27 :put =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match)
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
28 :put =matchstr(\"abcd\", \".\", 0, -1) " a
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
29 :put =match(\"abcd\", \".\", 0, 5) " -1
a81bc802c17c updated for version 7.0011
vimboss
parents: 12
diff changeset
30 :put =match(\"abcd\", \".\", 0, -1) " 0
3701
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
31 /^foobar
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
32 gncsearchmatch/one\_s*two\_s
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
33 :1
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
34 gnd
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
35 /[a]bcdx
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
36 :1
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
37 2gnd
12
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
38 :/^start:/,/^end:/wq! test.out
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
39 ENDTEST
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
40
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
41 start: "wo\"rd\\" foo
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
42 'foo' 'bar' 'piep'
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
43 bla bla `quote` blah
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
44 out " in "noXno"
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
45 "'" 'blah' rep 'buh'
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
46 bla `s*`d-`+++`l**` b`la
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
47 voo "nah" sdf " asdf" sdf " sdf" sd
853
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
48
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
49 <begin>
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
50 -<b>asdf<i>Xasdf</i>asdf</b>-
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
51 -<b>asdX<i>a<i />sdf</i>asdf</b>-
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
52 -<b>asdf<i>Xasdf</i>asdf</b>-
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
53 -<b>asdX<i>as<b />df</i>asdf</b>-
d10fbefd3bc1 updated for version 7.0f05
vimboss
parents: 19
diff changeset
54 </begin>
3701
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
55 SEARCH:
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 one
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
58 two
9f48a5432997 updated for version 7.3.610
Bram Moolenaar <bram@vim.org>
parents: 853
diff changeset
59 abcdx | abcdx | abcdx
12
bdeee1504ac1 updated for version 7.0004
vimboss
parents:
diff changeset
60 end: