Mercurial > vim
diff src/testdir/test_match.vim @ 12451:61450cb2b6a1 v8.0.1105
patch 8.0.1105: match() and matchend() are not tested
commit https://github.com/vim/vim/commit/1190cf68e27a123cf9f6fb57897782a3b9f7b810
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 14 14:31:18 2017 +0200
patch 8.0.1105: match() and matchend() are not tested
Problem: match() and matchend() are not tested.
Solution: Add tests. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/2088)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 14 Sep 2017 14:45:04 +0200 |
parents | f9de19f981a4 |
children | 631344964949 |
line wrap: on
line diff
--- a/src/testdir/test_match.vim +++ b/src/testdir/test_match.vim @@ -1,5 +1,5 @@ " Test for :match, :2match, :3match, clearmatches(), getmatches(), matchadd(), -" matchaddpos(), matcharg(), matchdelete(), matchstrpos() and setmatches(). +" matchaddpos(), matcharg(), matchdelete(), and setmatches(). function Test_match() highlight MyGroup1 term=bold ctermbg=red guibg=red @@ -150,15 +150,6 @@ function Test_match() highlight MyGroup3 NONE endfunc -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(['', -1, -1], matchstrpos('testing', 'ing', 8)) - call assert_equal(['ing', 1, 4, 7], matchstrpos(['vim', 'testing', 'execute'], 'ing')) - call assert_equal(['', -1, -1, -1], matchstrpos(['vim', 'testing', 'execute'], 'img')) -endfunc - func Test_matchaddpos() syntax on set hlsearch