patch 7.4.1685
Problem: There is no easy way to get all the information about a match.
Solution: Add matchstrpos(). (Ozaki Kiichi)
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index 0630998..4ee331f 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -15,6 +15,7 @@
source test_help_tagjump.vim
source test_join.vim
source test_lispwords.vim
+source test_matchstrpos.vim
source test_menu.vim
source test_partial.vim
source test_reltime.vim
diff --git a/src/testdir/test_matchstrpos.vim b/src/testdir/test_matchstrpos.vim
new file mode 100644
index 0000000..e14765b
--- /dev/null
+++ b/src/testdir/test_matchstrpos.vim
@@ -0,0 +1,13 @@
+" Test matchstrpos
+
+func Test_matchstrpos()
+ call assert_equal(['ing', 4, 7], matchstrpos('testing', 'ing'))
+
+ call assert_equal(['ing', 4, 7], matchstrpos('testing', 'ing', 2))
+
+ call assert_equal(['', -1, -1], matchstrpos('testing', 'ing', 5))
+
+ call assert_equal(['ing', 1, 4, 7], matchstrpos(['vim', 'testing', 'execute'], 'ing'))
+
+ call assert_equal(['', -1, -1, -1], matchstrpos(['vim', 'testing', 'execute'], 'img'))
+endfunc