summaryrefslogtreecommitdiff
path: root/src/testdir/test_matchstrpos.vim
blob: e14765b26b70bc7f3bfb2284eb12c309b468d864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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