Disallow repeating a case-change group.

Turn assertion into an error.
Fixes: https://github.com/boostorg/regex/issues/151
This commit is contained in:
jzmaddock committed 2021-10-13 17:59:56 +01:00
1 parent 2be85f36ee
commit b10c089aba
2 files changed
+16 -1

No files matched your search

+8
View File
@@ -496,5 +496,13 @@ void test_pocessive_repeats()
TEST_INVALID_REGEX("(ab + + +)", perl | mod_x);
TEST_INVALID_REGEX("(ab + + ?)", perl | mod_x);
#ifndef BOOST_REGEX_CXX03
// Some bug cases from https://github.com/boostorg/regex/issues/151
TEST_INVALID_REGEX("a|?+", perl | mod_x);
TEST_INVALID_REGEX("(?xi)a|?+", perl | mod_x);
TEST_INVALID_REGEX("(?xi)a|#\r*", perl | mod_x);
TEST_INVALID_REGEX("(?xi)|#\r*", perl | mod_x);
TEST_INVALID_REGEX("(?xi)|?+#\r*", perl | mod_x);
#endif
}