summaryrefslogtreecommitdiff
path: root/test/test_utf8.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-08-07 09:33:20 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-08-07 09:33:20 +0200
commit07b900d0bf8e732a347d27a5936b790a316c3197 (patch)
tree2443bfdda69965757d8ce335cda1a28bb7327834 /test/test_utf8.c
parent80e416a8ea3bd56ec54a74a93ddc2c61a398679a (diff)
parent1fb4b2b100d76cfa362cd021760b7cc0038cf55d (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'test/test_utf8.c')
-rw-r--r--test/test_utf8.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_utf8.c b/test/test_utf8.c
index bab6b0d..2338526 100644
--- a/test/test_utf8.c
+++ b/test/test_utf8.c
@@ -1202,10 +1202,23 @@ 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 */
+ n("()0\\xfc00000\\xfc00000\\xfc00000\xfc", ""); /* https://bugs.php.net/bug.php?id=77371 */
+ x2("000||0\xfa", "0", 0, 0); /* https://bugs.php.net/bug.php?id=77381 */
+ e("(?i)000000000000000000000\xf0", "", ONIGERR_INVALID_CODE_POINT_VALUE); /* https://bugs.php.net/bug.php?id=77382 */
+ n("0000\\\xf5", "0"); /* https://bugs.php.net/bug.php?id=77385 */
+ n("(?i)FFF00000000000000000\xfd", ""); /* https://bugs.php.net/bug.php?id=77394 */
+
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("(?<abc>\\g<abc>)", "zzzz", ONIGERR_NEVER_ENDING_RECURSION);
e("(?<=(?>abc))", "abc", ONIGERR_INVALID_LOOK_BEHIND_PATTERN);