Skip to content

Commit 90d41cc

Browse files
committed
ext/mbstring: move another test case that only works on 64 bits
1 parent b34b4d5 commit 90d41cc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/mbstring/tests/mb_decode_numericentity.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ test("Starting entity immediately after hex entity which is too long", "&#x11111
106106
test("Starting entity immediately after invalid decimal entity", "&#0A", "&#0A", [0x1, 0xFFFF, 0, 0xFFFF], 'ASCII');
107107
test("Starting entity immediately after invalid hex entity", "&#x0A", "&#x0A", [0x1, 0xFFFF, 0, 0xFFFF], 'ASCII');
108108

109-
// Previously, signed arithmetic was used on convmap entries
110-
test("Regression test (convmap entries are now treated as unsigned)", "&#7,", "?,", [0x22FFFF11, 0xBF111189, 0x67726511, 0x1161E719], "ASCII");
111-
112109
// Try with '&', '&#', or '&#' at the end of a buffer of wchars, with more input
113110
// still left to process in the next buffer
114111
// (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) "
179176
Starting entity immediately after hex entity which is too long: string(17) "&#x111111111A" => string(13) "&#x111111111A" (Good)
180177
Starting entity immediately after invalid decimal entity: string(8) "&#0A" => string(4) "&#0A" (Good)
181178
Starting entity immediately after invalid hex entity: string(9) "&#x0A" => string(5) "&#x0A" (Good)
182-
Regression test (convmap entries are now treated as unsigned): string(4) "&#7," => string(2) "?," (Good)

ext/mbstring/tests/mb_decode_numericentity_large_ints.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ test("Regression test (entity which decodes to 0xFFFFFFFF)", "", "?", [0xFF
4949
// because some text encodings did not properly invoke the next flush function in the chain
5050
test("Regression test (truncation of successive & with JIS encoding)", "&&&", "&&&", [0x20FF37FF, 0x7202F569, 0xC4090023, 0xF160], "JIS");
5151

52+
// Previously, signed arithmetic was used on convmap entries
53+
test("Regression test (convmap entries are now treated as unsigned)", "&#7,", "?,", [0x22FFFF11, 0xBF111189, 0x67726511, 0x1161E719], "ASCII");
54+
5255
?>
5356
--EXPECT--
5457
Starting entity immediately after valid decimal entity which is just within maximum length: 000000260000002300000031000000300000003000000030000000300000003000000030000000300000003000000030000000260000002300000036000000350000003b => 3b9aca0000000041 (Good)
5558
Starting entity immediately after valid hex entity which is just within maximum length: 0000002600000023000000780000003100000031000000310000003100000031000000310000003100000031000000260000002300000036000000350000003b => 1111111100000041 (Good)
5659
Starting entity immediately after too-big decimal entity: string(17) "&#7001492542A" => string(13) "&#7001492542A" (Good)
5760
Regression test (entity which decodes to 0xFFFFFFFF): string(5) "" => string(1) "?" (Good)
5861
Regression test (truncation of successive & with JIS encoding): string(3) "&&&" => string(3) "&&&" (Good)
62+
Regression test (convmap entries are now treated as unsigned): string(4) "&#7," => string(2) "?," (Good)

0 commit comments

Comments
 (0)