]> granicus.if.org Git - onig/commitdiff
add some test cases for #141
authorK.Kosako <kosako@sofnec.co.jp>
Mon, 13 May 2019 03:08:43 +0000 (12:08 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Mon, 13 May 2019 03:08:43 +0000 (12:08 +0900)
test/test_utf8.c

index bab6b0d9c3c6b7f52bdac2c3ade479c27e9de69f..8f8087d4c93d63ae53353fa724fe779b064572a8 100644 (file)
@@ -1203,6 +1203,14 @@ extern int main(int argc, char* argv[])
   x2("a{3,2}?", "", 0, 0);     /* == (?:a{3,2})?*/
   x2("a{2,3}+a", "aaa", 0, 3); /* == (?:a{2,3})+*/
 
+  n("   \\xfd", ""); /* https://bugs.php.net/bug.php?id=77370 */
+  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_TOO_SHORT_MULTI_BYTE_STRING); /* 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 */