]> granicus.if.org Git - php/commitdiff
Enable further ext/standard/tests/file tests on Windows
authorChristoph M. Becker <cmbecker69@gmx.de>
Fri, 10 Jul 2020 09:19:01 +0000 (11:19 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 10 Jul 2020 11:36:41 +0000 (13:36 +0200)
ext/standard/tests/file/fileinode_variation.phpt
ext/standard/tests/file/fopen_variation10-win32.phpt
ext/standard/tests/file/fopen_variation11-win32.phpt

index 881aa2ce59ae6df6f3a0ccd21036b78c15988c11..4006d94ffa01fe3bd238a4afcce8b7d2f6fc1641 100644 (file)
@@ -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--
index 300cf5286467d91806235180a699c4aba71932a3..8041c59c84a89f24f830eeb4c980e8129d398df9 100644 (file)
@@ -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.');
 }
 
@@ -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
index ed6508b69a381ad31651b0ca00685514bf3ef403..e40c48841db623cfb1912c48a1bf6780454fa1c6 100644 (file)
@@ -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.');
 }
 
@@ -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