mirror of
https://github.com/boostorg/regex.git
synced 2025-07-02 23:26:34 +02:00
Empty expressions, and empty alternatives are now
allowed when using the Perl regular expression syntax. This change has been added for Perl compatibility, when the new [syntax_option_type] ['no_empty_expressions] is set then the old behaviour is preserved and empty expressions are prohibited. This is issue [@https://svn.boost.org/trac/boost/ticket/1081 #1081]. Fixes #1081. [SVN r50374]
This commit is contained in:
@ -42,7 +42,8 @@ void basic_tests()
|
||||
TEST_REGEX_SEARCH("()", perl, "zzz", match_default, make_array(0, 0, 0, 0, -2, 1, 1, 1, 1, -2, 2, 2, 2, 2, -2, 3, 3, 3, 3, -2, -2));
|
||||
TEST_REGEX_SEARCH("()", perl, "", match_default, make_array(0, 0, 0, 0, -2, -2));
|
||||
TEST_INVALID_REGEX("(", perl);
|
||||
TEST_INVALID_REGEX("", perl);
|
||||
TEST_INVALID_REGEX("", perl|no_empty_expressions);
|
||||
TEST_REGEX_SEARCH("", perl, "abc", match_default, make_array(0, 0, -2, 1, 1, -2, 2, 2, -2, 3, 3, -2, -2));
|
||||
TEST_INVALID_REGEX(")", perl);
|
||||
TEST_INVALID_REGEX("(aa", perl);
|
||||
TEST_INVALID_REGEX("aa)", perl);
|
||||
|
Reference in New Issue
Block a user