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_substitute.vim b/src/testdir/test_substitute.vim
index a137aa5..f38eb55 100644
--- a/src/testdir/test_substitute.vim
+++ b/src/testdir/test_substitute.vim
@@ -246,6 +246,7 @@
call assert_fails("let s=substitute('abcda', [], 'A', 'g')", 'E730:')
call assert_fails("let s=substitute('abcda', 'a', [], 'g')", 'E730:')
call assert_fails("let s=substitute('abcda', 'a', 'A', [])", 'E730:')
+ call assert_fails("let s=substitute('abc', '\\%(', 'A', 'g')", 'E53:')
bwipe!
endfunc