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)
diff --git a/src/testdir/test_user_func.vim b/src/testdir/test_user_func.vim
index ed07d99..2edaec8 100644
--- a/src/testdir/test_user_func.vim
+++ b/src/testdir/test_user_func.vim
@@ -410,6 +410,9 @@
call writefile(['func foo#Bar()', 'return 1', 'endfunc'], 'Xscript')
call assert_fails('source Xscript', 'E746:')
call delete('Xscript')
+
+ " Try to list functions using an invalid search pattern
+ call assert_fails('function /\%(/', 'E53:')
endfunc
" Test for deleting a function