Skip to content

Commit 1f12d9d

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Enable most lstat_stat_* tests on Windows
2 parents 1eefa09 + 1973ca2 commit 1f12d9d

17 files changed

+61
-115
lines changed

ext/standard/tests/file/lstat_stat_error.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test lstat() and stat() functions: error conditions
3-
--SKIPIF--
4-
<?php
5-
if (substr(PHP_OS, 0, 3) == 'WIN') {
6-
die('skip.. lstat() not available on Windows');
7-
}
8-
?>
93
--FILE--
104
<?php
115
echo "*** Testing lstat() for error conditions ***\n";

ext/standard/tests/file/lstat_stat_variation1.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test lstat() and stat() functions: usage variations - effects of rename() on file
3-
--SKIPIF--
4-
<?php
5-
if (substr(PHP_OS, 0, 3) == 'WIN') {
6-
die('skip.. Not valid for Windows');
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* test the effects of rename() on stats of file */

ext/standard/tests/file/lstat_stat_variation10.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Test lstat() and stat() functions: usage variations - effects of is_dir()
33
--SKIPIF--
44
<?php
55
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
6-
if (substr(PHP_OS, 0, 3) == 'WIN') {
7-
die('skip.. Not valid for Windows');
8-
}
96
?>
107
--FILE--
118
<?php

ext/standard/tests/file/lstat_stat_variation11.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Test lstat() and stat() functions: usage variations - effect of is_file()
33
--SKIPIF--
44
<?php
55
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
6-
if (substr(PHP_OS, 0, 3) == 'WIN') {
7-
die('skip.. Not valid for Windows');
8-
}
96
?>
107
--FILE--
118
<?php

ext/standard/tests/file/lstat_stat_variation12.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ Test lstat() and stat() functions: usage variations - effects of is_link()
33
--SKIPIF--
44
<?php
55
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
6-
if (substr(PHP_OS, 0, 3) == 'WIN') {
7-
die('skip.. lstat() not available on Windows');
6+
if (PHP_OS_FAMILY === 'Windows') {
7+
include_once __DIR__ . '/windows_links/common.inc';
8+
skipIfSeCreateSymbolicLinkPrivilegeIsDisabled(__FILE__);
89
}
910
?>
1011
--FILE--

ext/standard/tests/file/lstat_stat_variation13.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Test lstat() and stat() functions: usage variations - file opened using w and r
33
--SKIPIF--
44
<?php
55
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
6-
if (substr(PHP_OS, 0, 3) == 'WIN') {
7-
die('skip.. Not valid for Windows');
8-
}
96
?>
107
--FILE--
118
<?php

ext/standard/tests/file/lstat_stat_variation14.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test lstat() and stat() functions: usage variations - hardlink
3-
--SKIPIF--
4-
<?php
5-
if (substr(PHP_OS, 0, 3) == 'WIN') {
6-
die('skip.. lstat() not available on Windows');
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* test the effects of is_link() on stats of hard link */

ext/standard/tests/file/lstat_stat_variation15.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ Test lstat() and stat() functions: usage variations - effects changing permissio
33
--SKIPIF--
44
<?php
55
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
6-
if (substr(PHP_OS, 0, 3) == 'WIN') {
7-
die('skip.. lstat() not available on Windows');
6+
if (PHP_OS_FAMILY === 'Windows') {
7+
include_once __DIR__ . '/windows_links/common.inc';
8+
skipIfSeCreateSymbolicLinkPrivilegeIsDisabled(__FILE__);
89
}
910
?>
1011
--FILE--

ext/standard/tests/file/lstat_stat_variation18.phpt

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test lstat() and stat() functions: usage variations - dir/file name stored in object
3-
--SKIPIF--
4-
<?php
5-
if (substr(PHP_OS, 0, 3) == 'WIN') {
6-
die('skip.. Not valid for Windows');
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* test for stats of dir/file when their names are stored in objects */
@@ -78,9 +72,9 @@ array(26) {
7872
[10]=>
7973
int(%d)
8074
[11]=>
81-
int(%d)
75+
int(%i)
8276
[12]=>
83-
int(%d)
77+
int(%i)
8478
["dev"]=>
8579
int(%d)
8680
["ino"]=>
@@ -104,9 +98,9 @@ array(26) {
10498
["ctime"]=>
10599
int(%d)
106100
["blksize"]=>
107-
int(%d)
101+
int(%i)
108102
["blocks"]=>
109-
int(%d)
103+
int(%i)
110104
}
111105

112106
-- Testing stat() on directory name stored inside an object --
@@ -134,9 +128,9 @@ array(26) {
134128
[10]=>
135129
int(%d)
136130
[11]=>
137-
int(%d)
131+
int(%i)
138132
[12]=>
139-
int(%d)
133+
int(%i)
140134
["dev"]=>
141135
int(%d)
142136
["ino"]=>
@@ -160,9 +154,9 @@ array(26) {
160154
["ctime"]=>
161155
int(%d)
162156
["blksize"]=>
163-
int(%d)
157+
int(%i)
164158
["blocks"]=>
165-
int(%d)
159+
int(%i)
166160
}
167161

168162
--- Done ---

ext/standard/tests/file/lstat_stat_variation19.phpt

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test lstat() and stat() functions: usage variations - dir/file names in array
3-
--SKIPIF--
4-
<?php
5-
if (substr(PHP_OS, 0, 3) == 'WIN') {
6-
die('skip.. Not valid for Windows');
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* test for stats of dir/file when their names are stored in an array */
@@ -79,9 +73,9 @@ array(26) {
7973
[10]=>
8074
int(%d)
8175
[11]=>
82-
int(%d)
76+
int(%i)
8377
[12]=>
84-
int(%d)
78+
int(%i)
8579
["dev"]=>
8680
int(%d)
8781
["ino"]=>
@@ -105,9 +99,9 @@ array(26) {
10599
["ctime"]=>
106100
int(%d)
107101
["blksize"]=>
108-
int(%d)
102+
int(%i)
109103
["blocks"]=>
110-
int(%d)
104+
int(%i)
111105
}
112106
array(26) {
113107
[0]=>
@@ -133,9 +127,9 @@ array(26) {
133127
[10]=>
134128
int(%d)
135129
[11]=>
136-
int(%d)
130+
int(%i)
137131
[12]=>
138-
int(%d)
132+
int(%i)
139133
["dev"]=>
140134
int(%d)
141135
["ino"]=>
@@ -159,9 +153,9 @@ array(26) {
159153
["ctime"]=>
160154
int(%d)
161155
["blksize"]=>
162-
int(%d)
156+
int(%i)
163157
["blocks"]=>
164-
int(%d)
158+
int(%i)
165159
}
166160

167161
-- Testing stat() on dir name stored inside an array --
@@ -189,9 +183,9 @@ array(26) {
189183
[10]=>
190184
int(%d)
191185
[11]=>
192-
int(%d)
186+
int(%i)
193187
[12]=>
194-
int(%d)
188+
int(%i)
195189
["dev"]=>
196190
int(%d)
197191
["ino"]=>
@@ -215,9 +209,9 @@ array(26) {
215209
["ctime"]=>
216210
int(%d)
217211
["blksize"]=>
218-
int(%d)
212+
int(%i)
219213
["blocks"]=>
220-
int(%d)
214+
int(%i)
221215
}
222216
array(26) {
223217
[0]=>
@@ -243,9 +237,9 @@ array(26) {
243237
[10]=>
244238
int(%d)
245239
[11]=>
246-
int(%d)
240+
int(%i)
247241
[12]=>
248-
int(%d)
242+
int(%i)
249243
["dev"]=>
250244
int(%d)
251245
["ino"]=>
@@ -269,9 +263,9 @@ array(26) {
269263
["ctime"]=>
270264
int(%d)
271265
["blksize"]=>
272-
int(%d)
266+
int(%i)
273267
["blocks"]=>
274-
int(%d)
268+
int(%i)
275269
}
276270

277271
--- Done ---

0 commit comments

Comments
 (0)