Mercurial > vim
diff src/testdir/test_search_stat.vim @ 22375:595ea7f099cd v8.2.1736
patch 8.2.1736: failure to compile a pattern not tested much
Commit: https://github.com/vim/vim/commit/531be47ac5522807b265c6287021a01c9b895ac9
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 23 22:38:05 2020 +0200
patch 8.2.1736: failure to compile a pattern not tested much
Problem: Failure to compile a pattern not tested much.
Solution: Add tests where a pattern fails to compile. (Yegappan Lakshmanan,
closes #7004)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Sep 2020 22:45:06 +0200 |
parents | 08940efa6b4e |
children | 5317b0ae4893 |
line wrap: on
line diff
--- a/src/testdir/test_search_stat.vim +++ b/src/testdir/test_search_stat.vim @@ -260,6 +260,14 @@ endfunc func Test_searchcount_fails() call assert_fails('echo searchcount("boo!")', 'E715:') + call assert_fails('echo searchcount({"timeout" : []})', 'E745:') + call assert_fails('echo searchcount({"maxcount" : []})', 'E745:') + call assert_fails('echo searchcount({"pattern" : []})', 'E730:') + call assert_fails('echo searchcount({"pos" : 1})', 'E475:') + call assert_fails('echo searchcount({"pos" : [1]})', 'E475:') + call assert_fails('echo searchcount({"pos" : [[], 2, 3]})', 'E745:') + call assert_fails('echo searchcount({"pos" : [1, [], 3]})', 'E745:') + call assert_fails('echo searchcount({"pos" : [1, 2, []]})', 'E745:') endfunc func Test_searchcount_in_statusline()