view src/testdir/test53.in @ 3778:29fe4e5c1db1 v7.3.647

updated for version 7.3.647 Problem: "gnd" doesn't work correctly in Visual mode. Solution: Handle Visual mode differently in "gn". (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Wed, 05 Sep 2012 12:16:45 +0200
parents 1810ee914648
children 34aa94a421b7
line wrap: on
line source

Tests for string and html text objects. vim: set ft=vim :

Note that the end-of-line moves the cursor to the next test line.

Also test match() and matchstr()

STARTTEST
:so small.vim
/^start:/
da"
0va'a'rx
02f`da`
0fXdi"
03f'vi'ry
:set quoteescape=+*-
di`
$F"va"oha"i"rz
:"
/^<begin
jfXdit
0fXdit
fXdat
0fXdat
:"
:put =matchstr(\"abcd\", \".\", 0, 2) " b
:put =matchstr(\"abcd\", \"..\", 0, 2) " bc
:put =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match)
:put =matchstr(\"abcd\", \".\", 0, -1) " a
:put =match(\"abcd\", \".\", 0, 5) " -1
:put =match(\"abcd\", \".\", 0, -1) " 0
/^foobar
gncsearchmatch/one\_s*two\_s
:1
gnd
/[a]bcdx
:1
2gnd/join
/$
0gnd
/\>\zs
0gnd/^
gnd$h/\zs
gnd/[u]niquepattern/s
vlgnd
:/^start:/,/^end:/wq! test.out
ENDTEST

start: "wo\"rd\\" foo
'foo' 'bar' 'piep'
bla bla `quote` blah
out " in "noXno"
"'" 'blah' rep 'buh'
bla `s*`d-`+++`l**` b`la
voo "nah" sdf " asdf" sdf " sdf" sd

<begin>
-<b>asdf<i>Xasdf</i>asdf</b>-
-<b>asdX<i>a<i />sdf</i>asdf</b>-
-<b>asdf<i>Xasdf</i>asdf</b>-
-<b>asdX<i>as<b />df</i>asdf</b>-
</begin>
SEARCH:
foobar
one
two
abcdx | abcdx | abcdx
join 
lines
zero width pattern
delete first and last chars
uniquepattern uniquepattern
end: