From: K.Kosako Date: Tue, 30 Jul 2019 05:15:56 +0000 (+0900) Subject: add some test cases X-Git-Tag: v6.9.3~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=458ebdaae17a693c777a6a9f1c661d08356d8076;p=onig add some test cases --- diff --git a/test/test_utf8.c b/test/test_utf8.c index 33e03bd..2338526 100644 --- a/test/test_utf8.c +++ b/test/test_utf8.c @@ -1202,6 +1202,8 @@ extern int main(int argc, char* argv[]) x2("a{3,2}b", "aab", 0, 3); x2("a{3,2}?", "", 0, 0); /* == (?:a{3,2})?*/ x2("a{2,3}+a", "aaa", 0, 3); /* == (?:a{2,3})+*/ + x2("[\\x{0}-\\x{7fffffff}]", "a", 0, 1); + x2("[\\x{7f}-\\x{7fffffff}]", "\xe5\xae\xb6", 0, 3); n(" \xfd", ""); /* https://bugs.php.net/bug.php?id=77370 */ /* can't use \xfc00.. because compiler error: hex escape sequence out of range */ @@ -1215,6 +1217,8 @@ extern int main(int argc, char* argv[]) x2("\\p{Common}", "\xe3\x8b\xbf", 0, 3); /* U+32FF */ x2("\\p{In_Enclosed_CJK_Letters_and_Months}", "\xe3\x8b\xbf", 0, 3); /* U+32FF */ + e("\\x{7fffffff}", "", ONIGERR_TOO_BIG_WIDE_CHAR_VALUE); + e("[\\x{7fffffff}]", "", ONIGERR_INVALID_CODE_POINT_VALUE); e("\\u040", "@", ONIGERR_INVALID_CODE_POINT_VALUE); e("(?\\g)", "zzzz", ONIGERR_NEVER_ENDING_RECURSION); e("(?<=(?>abc))", "abc", ONIGERR_INVALID_LOOK_BEHIND_PATTERN);