Skip to content

Commit 68a0efe

Browse files
orlitzkynielsdos
authored andcommitted
ext/standard/tests: 32bit wordwrap tests aren't just for Windows
The test in strings/wordwrap_memory_limit.phpt has a counterpart in strings/wordwrap_memory_limit_win32.phpt. The two are conditional on both the OS name and the size of an int (32- versus 64-bits). A Gentoo Linux user has however reported that the 64-bit test fails on a 32-bit system, with precisely the error message that the "win32" test is expecting. I don't have any 32-bit hardware to test myself, but I think it's reasonable to conclude that the OS name is not an essential part of the test: it's simply 32- versus 64-bit. This commit drops the conditionals for the OS name. Now one test will be run on 32-bit systems, and the other on 64-bit systems, regardless of the OS name. Bug: https://bugs.gentoo.org/935382
1 parent 89c3e03 commit 68a0efe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/standard/tests/strings/wordwrap_memory_limit.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
No overflow should occur during the memory_limit check for wordwrap()
33
--SKIPIF--
44
<?php
5-
if (substr(PHP_OS, 0, 3) == 'WIN' && PHP_INT_SIZE == 4) die("skip this test is not for 32bit Windows platforms");
5+
if (PHP_INT_SIZE == 4) die("skip this test is not for 32bit platforms");
66
if (getenv("USE_ZEND_ALLOC") === "0") die("skip Zend MM disabled");
77
?>
88
--INI--

ext/standard/tests/strings/wordwrap_memory_limit_win32.phpt renamed to ext/standard/tests/strings/wordwrap_memory_limit_32bit.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
No overflow should occur during the memory_limit check for wordwrap()
33
--SKIPIF--
44
<?php
5-
if (substr(PHP_OS, 0, 3) != 'WIN' || PHP_INT_SIZE != 4) die("skip this test is for 32bit Windows platforms only");
5+
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
66
if (getenv("USE_ZEND_ALLOC") === "0") die("skip Zend MM disabled");
77
?>
88
--INI--

0 commit comments

Comments
 (0)