diff --git a/test/regress/test_non_greedy_repeats.cpp b/test/regress/test_non_greedy_repeats.cpp index 4a720635..5cf507d2 100644 --- a/test/regress/test_non_greedy_repeats.cpp +++ b/test/regress/test_non_greedy_repeats.cpp @@ -35,6 +35,10 @@ void test_non_greedy_repeats() TEST_REGEX_SEARCH("abc|\\w+?", perl, "abcd", match_default, make_array(0, 3, -2, 3, 4, -2, -2)); TEST_REGEX_SEARCH("<\\s*tag[^>]*>(.*?)<\\s*/tag\\s*>", perl, " here is some text ", match_default, make_array(1, 29, 6, 23, -2, 30, 41, 35, 35, -2, -2)); TEST_REGEX_SEARCH("<\\s*tag[^>]*>(.*?)<\\s*/tag\\s*>", perl, " < tag attr=\"something\">here is some text< /tag > ", match_default, make_array(1, 49, 24, 41, -2, 50, 61, 55, 55, -2, -2)); + TEST_REGEX_SEARCH("xx-{0,2}?(?:[+-][0-9])??\\z", perl, "xx--", match_default, make_array(0, 4, -2, -2)); + TEST_REGEX_SEARCH("xx.{0,2}?(?:[+-][0-9])??\\z", perl, "xx--", match_default, make_array(0, 4, -2, -2)); + TEST_REGEX_SEARCH("xx.{0,2}?(?:[+-][0-9])??\\z", perl, "xx--", match_default|match_not_dot_newline, make_array(0, 4, -2, -2)); + TEST_REGEX_SEARCH("xx[/-]{0,2}?(?:[+-][0-9])??\\z", perl, "xx--", match_default, make_array(0, 4, -2, -2)); TEST_INVALID_REGEX("a{1,3}{1}", perl); TEST_INVALID_REGEX("a**", perl); TEST_INVALID_REGEX("a++", perl);