Skip to content

Commit

Permalink
Enable further ext/standard/tests/file tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cmb69 committed Jul 10, 2020
1 parent 7edc5e5 commit 99aa548
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions ext/standard/tests/file/fileinode_variation.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
Test fileinode() function: Variations
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip no link()/symlink() on Windows');
if (PHP_OS_FAMILY === 'Windows') {
require_once __DIR__ . '/windows_links/common.inc';
skipIfSeCreateSymbolicLinkPrivilegeIsDisabled(__FILE__);
}
?>
--FILE--
Expand Down
6 changes: 3 additions & 3 deletions ext/standard/tests/file/fopen_variation10-win32.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
if(substr(PHP_OS, 0, 3) != "WIN")
die("skip Run only on Windows");

if (!is_writable('c:\\fopen_variation10.tmp')) {
if (!is_writable('c:\\')) {
die('skip. C:\\ not writable.');
}

Expand Down Expand Up @@ -102,14 +102,14 @@ Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %

--\--

Warning: fopen(\\fopen_variation10.tmp): failed to open stream: Invalid argument in %s on line %d
Warning: fopen(\\fopen_variation10.tmp): failed to open stream: No such file or directory in %s on line %d
file not opened for read

Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d

--/--

Warning: fopen(/\fopen_variation10.tmp): failed to open stream: Invalid argument in %s on line %d
Warning: fopen(/\fopen_variation10.tmp): failed to open stream: No such file or directory in %s on line %d
file not opened for read

Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d
Expand Down
6 changes: 3 additions & 3 deletions ext/standard/tests/file/fopen_variation11-win32.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
<?php
if(substr(PHP_OS, 0, 3) != "WIN")
die("skip Run only on Windows");
if (!is_writable('c:\\fopen_variation10.tmp')) {
if (!is_writable('c:\\')) {
die('skip. C:\\ not writable.');
}

Expand Down Expand Up @@ -100,14 +100,14 @@ Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %

--\--

Warning: fopen(\\FOPEN_VARIATION11.TMP): failed to open stream: Invalid argument in %s on line %d
Warning: fopen(\\FOPEN_VARIATION11.TMP): failed to open stream: No such file or directory in %s on line %d
file not opened for read

Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d

--/--

Warning: fopen(\\FOPEN_VARIATION11.TMP): failed to open stream: Invalid argument in %s on line %d
Warning: fopen(\\FOPEN_VARIATION11.TMP): failed to open stream: No such file or directory in %s on line %d
file not opened for read

Warning: fclose() expects parameter 1 to be resource, bool given in %s on line %d
Expand Down

0 comments on commit 99aa548

Please sign in to comment.