Bram Moolenaar | 7fed5c1 | 2016-03-29 23:10:31 +0200 | [diff] [blame^] | 1 | " Test matchstrpos |
2 | |||||
3 | func 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')) | ||||
13 | endfunc |