Skip to content

Commit 371a6c7

Browse files
committed
Test more edge cases for insertData
1 parent 0c3fe96 commit 371a6c7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/dom/tests/modern/spec/CharacterData_insertData_edge_cases.phpt

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
insertData() edge cases
33
--EXTENSIONS--
44
dom
5+
--SKIPIF--
6+
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only"); ?>
57
--FILE--
68
<?php
79

@@ -12,9 +14,15 @@ try {
1214
} catch (DOMException $e) {
1315
echo $e->getMessage(), "\n";
1416
}
17+
try {
18+
var_dump($comment->insertData(2**31+1, "data"));
19+
} catch (DOMException $e) {
20+
echo $e->getMessage(), "\n";
21+
}
1522
echo $dom->saveHTML($comment), "\n";
1623

1724
?>
1825
--EXPECT--
1926
Index Size Error
27+
Index Size Error
2028
<!--foobarbaz-->

0 commit comments

Comments
 (0)