diff --git a/ext/mbstring/tests/mb_decode_numericentity.phpt b/ext/mbstring/tests/mb_decode_numericentity.phpt index b58a2c5ed9d..e5c6d092a49 100644 --- a/ext/mbstring/tests/mb_decode_numericentity.phpt +++ b/ext/mbstring/tests/mb_decode_numericentity.phpt @@ -106,9 +106,6 @@ test("Starting entity immediately after hex entity which is too long", "𑄑 test("Starting entity immediately after invalid decimal entity", "�A", "�A", [0x1, 0xFFFF, 0, 0xFFFF], 'ASCII'); test("Starting entity immediately after invalid hex entity", "�A", " ", [0x1, 0xFFFF, 0, 0xFFFF], 'ASCII'); -// Previously, signed arithmetic was used on convmap entries -test("Regression test (convmap entries are now treated as unsigned)", ",", "?,", [0x22FFFF11, 0xBF111189, 0x67726511, 0x1161E719], "ASCII"); - // Try with '&', '&#', or '&#' at the end of a buffer of wchars, with more input // still left to process in the next buffer // (mb_decode_numericentity splits its input into 'chunks' and processes it one @@ -179,4 +176,3 @@ Starting entity immediately after decimal entity which is too long: string(18) " Starting entity immediately after hex entity which is too long: string(17) "�A" => string(13) "�" (Good) Starting entity immediately after invalid decimal entity: string(8) "�A" => string(4) "�A" (Good) Starting entity immediately after invalid hex entity: string(9) "�A" => string(5) " " (Good) -Regression test (convmap entries are now treated as unsigned): string(4) "," => string(2) "?," (Good) diff --git a/ext/mbstring/tests/mb_decode_numericentity_large_ints.phpt b/ext/mbstring/tests/mb_decode_numericentity_large_ints.phpt index c61001d9553..c564e34ca7e 100644 --- a/ext/mbstring/tests/mb_decode_numericentity_large_ints.phpt +++ b/ext/mbstring/tests/mb_decode_numericentity_large_ints.phpt @@ -49,6 +49,9 @@ test("Regression test (entity which decodes to 0xFFFFFFFF)", "", "?", [0xFF // because some text encodings did not properly invoke the next flush function in the chain test("Regression test (truncation of successive & with JIS encoding)", "&&&", "&&&", [0x20FF37FF, 0x7202F569, 0xC4090023, 0xF160], "JIS"); +// Previously, signed arithmetic was used on convmap entries +test("Regression test (convmap entries are now treated as unsigned)", ",", "?,", [0x22FFFF11, 0xBF111189, 0x67726511, 0x1161E719], "ASCII"); + ?> --EXPECT-- Starting entity immediately after valid decimal entity which is just within maximum length: 000000260000002300000031000000300000003000000030000000300000003000000030000000300000003000000030000000260000002300000036000000350000003b => 3b9aca0000000041 (Good) @@ -56,3 +59,4 @@ Starting entity immediately after valid hex entity which is just within maximum Starting entity immediately after too-big decimal entity: string(17) "�A" => string(13) "�A" (Good) Regression test (entity which decodes to 0xFFFFFFFF): string(5) "" => string(1) "?" (Good) Regression test (truncation of successive & with JIS encoding): string(3) "&&&" => string(3) "&&&" (Good) +Regression test (convmap entries are now treated as unsigned): string(4) "," => string(2) "?," (Good)