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_options.vim b/src/testdir/test_options.vim
index ec40ccc..22e0809 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -411,6 +411,7 @@
     call assert_fails('set pyxversion=6', 'E474:')
   endif
   call assert_fails("let &tabstop='ab'", 'E521:')
+  call assert_fails('set spellcapcheck=%\\(', 'E54:')
 endfunc
 
 func CheckWasSet(name)