summaryrefslogtreecommitdiff
path: root/src/testdir/test14.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-03-19 15:27:48 +0100
committerBram Moolenaar <Bram@vim.org>2013-03-19 15:27:48 +0100
commitdb333a5b8d0c72b7342d6d65ad2895a19a1c29d2 (patch)
treeba5d5768d952510d3f3e10f6a258e409e33d974e /src/testdir/test14.in
parentaf62ff3696514a4f1b595629bcfa584748bc29ce (diff)
downloadvim-db333a5b8d0c72b7342d6d65ad2895a19a1c29d2.zip
updated for version 7.3.871
Problem: search('^$', 'c') does not use the empty match under the cursor. Solution: Special handling of the 'c' flag. (Christian Brabandt) Add tests.
Diffstat (limited to 'src/testdir/test14.in')
-rw-r--r--src/testdir/test14.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test14.in b/src/testdir/test14.in
index 05c80257b..b6f2f5760 100644
--- a/src/testdir/test14.in
+++ b/src/testdir/test14.in
@@ -2,6 +2,7 @@ Tests for "vaBiB", end could be wrong.
Also test ":s/pat/sub/" with different ~s in sub.
Also test for ^Vxff and ^Vo123 in Insert mode.
Also test "[m", "]m", "[M" and "]M"
+Also test search()
STARTTEST
:so small.vim
@@ -34,6 +35,16 @@ j2]MaH:.w >>test.out
2[MaJ:.w >>test.out
k[MaK:.w >>test.out
3[MaL:.w >>test.out
+:"
+/^foobar
+:let startline = line('.')
+:call search('foobar', 'c')
+:call append(line('$'), line('.') - startline)
+j:call search('^$', 'c')
+:call append(line('$'), line('.') - startline)
+:call search('^$', 'bc')
+:call append(line('$'), line('.') - startline)
+:/^search()/,$w >>test.out
:qa!
ENDTEST
@@ -64,3 +75,8 @@ Piece of Java
}
} e3
}
+
+foobar
+
+
+search()