blob: e14765b26b70bc7f3bfb2284eb12c309b468d864 [file] [log] [blame]
Bram Moolenaar7fed5c12016-03-29 23:10:31 +02001" Test matchstrpos
2
3func Test_matchstrpos()
4 call assert_equal(['ing', 4, 7], matchstrpos('testing', 'ing'))
5
6 call assert_equal(['ing', 4, 7], matchstrpos('testing', 'ing', 2))
7
8 call assert_equal(['', -1, -1], matchstrpos('testing', 'ing', 5))
9
10 call assert_equal(['ing', 1, 4, 7], matchstrpos(['vim', 'testing', 'execute'], 'ing'))
11
12 call assert_equal(['', -1, -1, -1], matchstrpos(['vim', 'testing', 'execute'], 'img'))
13endfunc