Mercurial > vim
comparison src/testdir/test_functions.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 | 0e231e8e70f8 |
children | 770fe121ca64 |
comparison
equal
deleted
inserted
replaced
22374:e9b3a8c9ae2c | 22375:595ea7f099cd |
---|---|
971 call assert_equal(3, match(['a', 'b', 'c', 'a'], 'a', 1)) | 971 call assert_equal(3, match(['a', 'b', 'c', 'a'], 'a', 1)) |
972 call assert_equal(-1, match(['a', 'b', 'c', 'a'], 'a', 5)) | 972 call assert_equal(-1, match(['a', 'b', 'c', 'a'], 'a', 5)) |
973 call assert_equal(4, match('testing', 'ing', -1)) | 973 call assert_equal(4, match('testing', 'ing', -1)) |
974 call assert_fails("let x=match('testing', 'ing', 0, [])", 'E745:') | 974 call assert_fails("let x=match('testing', 'ing', 0, [])", 'E745:') |
975 call assert_equal(-1, match(test_null_list(), 2)) | 975 call assert_equal(-1, match(test_null_list(), 2)) |
976 call assert_equal(-1, match('abc', '\\%(')) | |
976 endfunc | 977 endfunc |
977 | 978 |
978 func Test_matchend() | 979 func Test_matchend() |
979 call assert_equal(7, matchend('testing', 'ing')) | 980 call assert_equal(7, matchend('testing', 'ing')) |
980 call assert_equal(7, 'testing'->matchend('ing', 2)) | 981 call assert_equal(7, 'testing'->matchend('ing', 2)) |