Mercurial > vim
annotate src/testdir/test53.in @ 5064:8875401008da v7.3.1275
updated for version 7.3.1275
Problem: "gn" does not work when the match is a single character.
Solution: Fix it, add a test. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 30 Jun 2013 14:46:53 +0200 |
parents | 34aa94a421b7 |
children | eb33cadafcab |
rev | line source |
---|---|
853 | 1 Tests for string and html text objects. vim: set ft=vim : |
12 | 2 |
19 | 3 Note that the end-of-line moves the cursor to the next test line. |
4 | |
5 Also test match() and matchstr() | |
6 | |
12 | 7 STARTTEST |
8 :so small.vim | |
9 /^start:/ | |
10 da" | |
11 0va'a'rx | |
12 02f`da` | |
13 0fXdi" | |
14 03f'vi'ry | |
15 :set quoteescape=+*- | |
16 di` | |
17 $F"va"oha"i"rz | |
853 | 18 :" |
19 /^<begin | |
20 jfXdit | |
21 0fXdit | |
22 fXdat | |
23 0fXdat | |
24 :" | |
25 :put =matchstr(\"abcd\", \".\", 0, 2) " b | |
19 | 26 :put =matchstr(\"abcd\", \"..\", 0, 2) " bc |
27 :put =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match) | |
28 :put =matchstr(\"abcd\", \".\", 0, -1) " a | |
29 :put =match(\"abcd\", \".\", 0, 5) " -1 | |
30 :put =match(\"abcd\", \".\", 0, -1) " 0 | |
3701 | 31 /^foobar |
32 gncsearchmatch/one\_s*two\_s | |
33 :1 | |
34 gnd | |
35 /[a]bcdx | |
36 :1 | |
3774 | 37 2gnd/join |
38 /$ | |
39 0gnd | |
40 /\>\zs | |
41 0gnd/^ | |
42 gnd$h/\zs | |
3778 | 43 gnd/[u]niquepattern/s |
44 vlgnd | |
3857 | 45 /mother |
46 :set selection=exclusive | |
5064
8875401008da
updated for version 7.3.1275
Bram Moolenaar <bram@vim.org>
parents:
3857
diff
changeset
|
47 $cgNmongoose/i |
8875401008da
updated for version 7.3.1275
Bram Moolenaar <bram@vim.org>
parents:
3857
diff
changeset
|
48 cgnj |
12 | 49 :/^start:/,/^end:/wq! test.out |
50 ENDTEST | |
51 | |
52 start: "wo\"rd\\" foo | |
53 'foo' 'bar' 'piep' | |
54 bla bla `quote` blah | |
55 out " in "noXno" | |
56 "'" 'blah' rep 'buh' | |
57 bla `s*`d-`+++`l**` b`la | |
58 voo "nah" sdf " asdf" sdf " sdf" sd | |
853 | 59 |
60 <begin> | |
61 -<b>asdf<i>Xasdf</i>asdf</b>- | |
62 -<b>asdX<i>a<i />sdf</i>asdf</b>- | |
63 -<b>asdf<i>Xasdf</i>asdf</b>- | |
64 -<b>asdX<i>as<b />df</i>asdf</b>- | |
65 </begin> | |
3701 | 66 SEARCH: |
67 foobar | |
68 one | |
69 two | |
70 abcdx | abcdx | abcdx | |
3774 | 71 join |
72 lines | |
73 zero width pattern | |
74 delete first and last chars | |
3778 | 75 uniquepattern uniquepattern |
3857 | 76 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
|
77 for (i=0; i<=10; i++) |
12 | 78 end: |