aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test53.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test53.in')
-rw-r--r--src/nvim/testdir/test53.in123
1 files changed, 123 insertions, 0 deletions
diff --git a/src/nvim/testdir/test53.in b/src/nvim/testdir/test53.in
new file mode 100644
index 0000000000..011c9ae39d
--- /dev/null
+++ b/src/nvim/testdir/test53.in
@@ -0,0 +1,123 @@
+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()
+
+Also test the gn command and repeating it.
+
+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
+:put =match('abc', '.', 0, 1) " 0
+:put =match('abc', '.', 0, 2) " 1
+:put =match('abc', '.', 0, 3) " 2
+:put =match('abc', '.', 0, 4) " -1
+:put =match('abc', '.', 1, 1) " 1
+:put =match('abc', '.', 2, 1) " 2
+:put =match('abc', '.', 3, 1) " -1
+:put =match('abc', '$', 0, 1) " 3
+:put =match('abc', '$', 0, 2) " -1
+:put =match('abc', '$', 1, 1) " 3
+:put =match('abc', '$', 2, 1) " 3
+:put =match('abc', '$', 3, 1) " 3
+:put =match('abc', '$', 4, 1) " -1
+:put =match('abc', '\zs', 0, 1) " 0
+:put =match('abc', '\zs', 0, 2) " 1
+:put =match('abc', '\zs', 0, 3) " 2
+:put =match('abc', '\zs', 0, 4) " 3
+:put =match('abc', '\zs', 0, 5) " -1
+:put =match('abc', '\zs', 1, 1) " 1
+:put =match('abc', '\zs', 2, 1) " 2
+:put =match('abc', '\zs', 3, 1) " 3
+:put =match('abc', '\zs', 4, 1) " -1
+/^foobar
+gncsearchmatch/one\_s*two\_s
+:1
+gnd
+/[a]bcdx
+:1
+2gnd/join
+/$
+0gnd
+/\>\zs
+0gnd/^
+gnd$h/\zs
+gnd/[u]niquepattern/s
+vlgnd
+/mother
+:set selection=exclusive
+$cgNmongoose/i
+cgnj
+:" Make sure there is no other match y uppercase.
+/x59
+gggnd
+:" test repeating dgn
+/^Johnny
+ggdgn.
+:" test repeating gUgn
+/^Depp
+gggUgn.
+:/^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
+my very excellent mother just served us nachos
+for (i=0; i<=10; i++)
+Y
+text
+Y
+--1
+Johnny
+--2
+Johnny
+--3
+Depp
+--4
+Depp
+--5
+end: