diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-23 22:38:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-23 22:38:05 +0200 |
commit | 531be47ac5522807b265c6287021a01c9b895ac9 (patch) | |
tree | 6ff8a223defdf477cdd5243fc2eee4f53ae71292 /src/testdir/test_checkpath.vim | |
parent | 851d108313317a062371a6750e6c6bf370a9bafa (diff) |
patch 8.2.1736: failure to compile a pattern not tested muchv8.2.1736
Problem: Failure to compile a pattern not tested much.
Solution: Add tests where a pattern fails to compile. (Yegappan Lakshmanan,
closes #7004)
Diffstat (limited to 'src/testdir/test_checkpath.vim')
-rw-r--r-- | src/testdir/test_checkpath.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_checkpath.vim b/src/testdir/test_checkpath.vim index 28e9105736..f6a3bbce08 100644 --- a/src/testdir/test_checkpath.vim +++ b/src/testdir/test_checkpath.vim @@ -103,4 +103,19 @@ func Test_checkpath3() set includeexpr& endfunc +" Test for invalid regex in 'include' and 'define' options +func Test_checkpath_errors() + let save_include = &include + set include=\\%( + call assert_fails('checkpath', 'E53:') + let &include = save_include + + let save_define = &define + set define=\\%( + call assert_fails('dsearch abc', 'E53:') + let &define = save_define + + call assert_fails('psearch \%(', 'E53:') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |