Skip to content

Commit c1b5e7a

Browse files
committed
Enable further tests on Windows
1 parent 6ffe08d commit c1b5e7a

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

ext/standard/tests/general_functions/parse_ini_file.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
parse_ini_file() multiple calls
3-
--SKIPIF--
4-
<?php if( substr(PHP_OS, 0, 3) == 'WIN' ) die("skip Windows has different error message");?>
53
--FILE--
64
<?php
75

ext/standard/tests/network/tcp6loop.phpt

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

ext/standard/tests/network/udp6loop.phpt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Streams Based IPv6 UDP Loopback test
33
--SKIPIF--
44
<?php
55
/* If IPv6 is supported on the platform this will error out with code 111 -
6-
* Connection refused. If IPv6 is NOT supported, $errno will be set to
6+
* Connection refused (or code 10049 on Windows). If IPv6 is NOT supported, $errno will be set to
77
* something else (indicating parse/getaddrinfo error)
88
* Note: Might be a good idea to export an IPv6 support indicator
99
* (such as AF_INET6 exported by ext/sockets), however, since we
@@ -12,7 +12,9 @@ Streams Based IPv6 UDP Loopback test
1212
*/
1313

1414
@stream_socket_client('tcp://[::1]:0', $errno);
15-
if ($errno != 111) die('skip IPv6 not supported.');
15+
if ((PHP_OS_FAMILY === 'Windows' && $errno !== 10049) || (PHP_OS_FAMILY !== 'Windows' && $errno !== 111)) {
16+
die('skip IPv6 is not supported.');
17+
}
1618
?>
1719
--FILE--
1820
<?php

ext/standard/tests/streams/bug76136.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bug #76136: stream_socket_get_name should enclose IPv6 in brackets
33
--SKIPIF--
44
<?php
55
@stream_socket_client('tcp://[::1]:0', $errno);
6-
if ($errno != 111) {
6+
if ((PHP_OS_FAMILY === 'Windows' && $errno !== 10049) || (PHP_OS_FAMILY !== 'Windows' && $errno !== 111)) {
77
die('skip IPv6 is not supported.');
88
}
99
?>

ext/standard/tests/strings/bug24098.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
--TEST--
22
Bug #24098 (pathinfo() crash)
3-
--SKIPIF--
4-
<?php if (DIRECTORY_SEPARATOR == '\\') die("skip directory separator won't match expected output"); ?>
53
--FILE--
64
<?php
75
var_dump(pathinfo("/dsds.asa"));
86
?>
9-
--EXPECT--
7+
--EXPECTF--
108
array(4) {
119
["dirname"]=>
12-
string(1) "/"
10+
string(1) "%e"
1311
["basename"]=>
1412
string(8) "dsds.asa"
1513
["extension"]=>

0 commit comments

Comments
 (0)