diff options
Diffstat (limited to 'src/nvim/testdir/test_matchstrpos.vim')
-rw-r--r-- | src/nvim/testdir/test_matchstrpos.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_matchstrpos.vim b/src/nvim/testdir/test_matchstrpos.vim new file mode 100644 index 0000000000..e14765b26b --- /dev/null +++ b/src/nvim/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 |