patch 8.1.1214: old style tests
Problem: Old style tests.
Solution: Move tests from test14 to new style test files. (Yegappan
Lakshmanan, closes #4308)
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index 525d0d2..d59f39d 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -1265,3 +1265,27 @@
set incsearch&
bwipe!
endfunc
+
+" Test for the search() function with match at the cursor position
+func Test_search_match_at_curpos()
+ new
+ call append(0, ['foobar', '', 'one two', ''])
+
+ normal gg
+
+ call search('foobar', 'c')
+ call assert_equal([1, 1], [line('.'), col('.')])
+
+ normal j
+ call search('^$', 'c')
+ call assert_equal([2, 1], [line('.'), col('.')])
+
+ call search('^$', 'bc')
+ call assert_equal([2, 1], [line('.'), col('.')])
+
+ exe "normal /two\<CR>"
+ call search('.', 'c')
+ call assert_equal([3, 5], [line('.'), col('.')])
+
+ close!
+endfunc