]> granicus.if.org Git - onig/commitdiff
fix some test cases
authorK.Kosako <kosako@sofnec.co.jp>
Tue, 14 May 2019 00:28:18 +0000 (09:28 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Tue, 14 May 2019 00:28:18 +0000 (09:28 +0900)
test/test_utf8.c

index 8f8087d4c93d63ae53353fa724fe779b064572a8..33e03bd9940d213c6f65c2591b37461c94fd183f 100644 (file)
@@ -1203,11 +1203,12 @@ 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("   \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 */