Merge branch 'PHP-7.4'

* PHP-7.4:
  Enable further tests on Windows
This commit is contained in:
Christoph M. Becker 2020-07-16 16:08:07 +02:00
commit 7e357f470d
5 changed files with 11 additions and 11 deletions

View file

@ -1,7 +1,5 @@
--TEST-- --TEST--
parse_ini_file() multiple calls parse_ini_file() multiple calls
--SKIPIF--
<?php if( substr(PHP_OS, 0, 3) == 'WIN' ) die("skip Windows has different error message");?>
--FILE-- --FILE--
<?php <?php

View file

@ -2,11 +2,13 @@
Streams Based IPv6 TCP Loopback test Streams Based IPv6 TCP Loopback test
--SKIPIF-- --SKIPIF--
<?php <?php
/* If IPv6 is supported on the platform this will error out with code 111 - Connection refused. /* If IPv6 is supported on the platform this will error out with code 111 - Connection refused (or code 10049 on Windows).
If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error) If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error)
Note: Might be a good idea to export an IPv6 support indicator (such as AF_INET6 exported by ext/sockets) */ Note: Might be a good idea to export an IPv6 support indicator (such as AF_INET6 exported by ext/sockets) */
@stream_socket_client('tcp://[::1]:0', $errno); @stream_socket_client('tcp://[::1]:0', $errno);
if ($errno != 111) die('skip IPv6 not supported.'); if ((PHP_OS_FAMILY === 'Windows' && $errno !== 10049) || (PHP_OS_FAMILY !== 'Windows' && $errno !== 111)) {
die('skip IPv6 is not supported.');
}
?> ?>
--FILE-- --FILE--
<?php <?php

View file

@ -3,7 +3,7 @@ Streams Based IPv6 UDP Loopback test
--SKIPIF-- --SKIPIF--
<?php <?php
/* If IPv6 is supported on the platform this will error out with code 111 - /* If IPv6 is supported on the platform this will error out with code 111 -
* Connection refused. If IPv6 is NOT supported, $errno will be set to * Connection refused (or code 10049 on Windows). If IPv6 is NOT supported, $errno will be set to
* something else (indicating parse/getaddrinfo error) * something else (indicating parse/getaddrinfo error)
* Note: Might be a good idea to export an IPv6 support indicator * Note: Might be a good idea to export an IPv6 support indicator
* (such as AF_INET6 exported by ext/sockets), however, since we * (such as AF_INET6 exported by ext/sockets), however, since we
@ -12,7 +12,9 @@ Streams Based IPv6 UDP Loopback test
*/ */
@stream_socket_client('tcp://[::1]:0', $errno); @stream_socket_client('tcp://[::1]:0', $errno);
if ($errno != 111) die('skip IPv6 not supported.'); if ((PHP_OS_FAMILY === 'Windows' && $errno !== 10049) || (PHP_OS_FAMILY !== 'Windows' && $errno !== 111)) {
die('skip IPv6 is not supported.');
}
?> ?>
--FILE-- --FILE--
<?php <?php

View file

@ -3,7 +3,7 @@ Bug #76136: stream_socket_get_name should enclose IPv6 in brackets
--SKIPIF-- --SKIPIF--
<?php <?php
@stream_socket_client('tcp://[::1]:0', $errno); @stream_socket_client('tcp://[::1]:0', $errno);
if ($errno != 111) { if ((PHP_OS_FAMILY === 'Windows' && $errno !== 10049) || (PHP_OS_FAMILY !== 'Windows' && $errno !== 111)) {
die('skip IPv6 is not supported.'); die('skip IPv6 is not supported.');
} }
?> ?>

View file

@ -1,15 +1,13 @@
--TEST-- --TEST--
Bug #24098 (pathinfo() crash) Bug #24098 (pathinfo() crash)
--SKIPIF--
<?php if (DIRECTORY_SEPARATOR == '\\') die("skip directory separator won't match expected output"); ?>
--FILE-- --FILE--
<?php <?php
var_dump(pathinfo("/dsds.asa")); var_dump(pathinfo("/dsds.asa"));
?> ?>
--EXPECT-- --EXPECTF--
array(4) { array(4) {
["dirname"]=> ["dirname"]=>
string(1) "/" string(1) "%e"
["basename"]=> ["basename"]=>
string(8) "dsds.asa" string(8) "dsds.asa"
["extension"]=> ["extension"]=>