mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
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)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user