]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/regex/test/regress/test_perl_ex.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / regex / test / regress / test_perl_ex.cpp
index 731254199ff42266d237403566d1e35c6b113793..6a53256d1e987e4eb4585f9cd3790775252db8e6 100644 (file)
@@ -205,6 +205,18 @@ void test_options()
    TEST_REGEX_SEARCH("(a (?x)b c)d e", perl, "a bcde", match_default, make_array(-2, -2));
    TEST_REGEX_SEARCH("(a b(?x)c d (?-x)e f)", perl, "a bcde f", match_default, make_array(0, 8, 0, 8, -2, -2));
    TEST_REGEX_SEARCH("(a b(?x)c d (?-x)e f)", perl, "abcdef", match_default, make_array(-2, -2));
+
+   TEST_INVALID_REGEX("a++(?#abc)+", perl);
+   TEST_INVALID_REGEX("a++(?#abc)?", perl);
+   TEST_INVALID_REGEX("a++(?#abc)*", perl);
+   TEST_INVALID_REGEX("a++(?#abc){2}", perl);
+   TEST_INVALID_REGEX("a++(?#abc)(?#more)+", perl);
+   TEST_REGEX_SEARCH("(?x) ab (?#first comment) (?#more)   +", perl, "abbbb", match_default, make_array(0, 5, -2, -2));
+   TEST_REGEX_SEARCH("ab(?#first comment)(?#more)+", perl, "abbbb", match_default, make_array(0, 5, -2, -2));
+   TEST_REGEX_SEARCH("(?x) ab (?#first comment) (?#more)   (c)", perl, "abc", match_default, make_array(0, 3, 2, 3, -2, -2));
+   TEST_REGEX_SEARCH("ab(?#first comment)(?#more)(c)", perl, "abc", match_default, make_array(0, 3, 2, 3, -2, -2));
+   TEST_REGEX_SEARCH("(?x) ab (?#first comment) (?#more)   (?:c)", perl, "abc", match_default, make_array(0, 3, -2, -2));
+   TEST_REGEX_SEARCH("ab(?#first comment)(?#more)(?:c)", perl, "abc", match_default, make_array(0, 3, -2, -2));
 }
 
 void test_options2()