]> granicus.if.org Git - php/commitdiff
- fix skip clauses
authorPierre Joye <pajoye@php.net>
Sat, 30 Jan 2010 21:24:04 +0000 (21:24 +0000)
committerPierre Joye <pajoye@php.net>
Sat, 30 Jan 2010 21:24:04 +0000 (21:24 +0000)
ext/standard/tests/file/windows_links/bug48746_2.phpt
ext/standard/tests/file/windows_links/bug48746_3.phpt

index a8cf48d3a88fd3f213eb1e71b278381433571d65..c8c335f12fa082882519d612f74e5a35ad43e4c7 100644 (file)
@@ -9,11 +9,11 @@ Venkat Raman Don (don.raman@microsoft.com)
 if(substr(PHP_OS, 0, 3) != 'WIN' ) {\r
     die('skip windows only test');\r
 }\r
-$cmd = "mklink.exe /?";\r
-$ret = @exec($cmd, $output, $return_val);\r
-if (count($output) == 0) {\r
-    die("mklink.exe not found in PATH");\r
+$ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 2>&1', $out);\r
+if (strpos($ret, 'privilege')) {\r
+       die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');\r
 }\r
+unlink('mklink bug48746_tmp.lnk');\r
 ?>\r
 --FILE--\r
 <?php\r
@@ -63,4 +63,4 @@ Array
     [1] => ..\r
     [2] => a.php\r
     [3] => b.php\r
-)
+)\r
index ebc31ea59815a659f7b8b1274d64bc6599dd1735..e6de9c848fb392438e28f7018785c574845e042a 100644 (file)
@@ -7,13 +7,13 @@ Venkat Raman Don (don.raman@microsoft.com)
 --SKIPIF--\r
 <?php\r
 if(substr(PHP_OS, 0, 3) != 'WIN' ) {\r
-    die('skip windows only test');\r
+       die('skip windows only test');\r
 }\r
-$cmd = "junction.exe /?";\r
-$ret = @exec($cmd, $output, $return_val);\r
-if (count($output) == 0) {\r
-    die("junction.exe not found in PATH");\r
+$ret = exec('junction /? 2>&1', $out);\r
+if (strpos($out[0], 'recognized')) {\r
+       die('skip. junction.exe not found in PATH.');\r
 }\r
+\r
 ?>\r
 --FILE--\r
 <?php\r
@@ -45,4 +45,4 @@ Array
     [1] => ..\r
     [2] => a.php\r
     [3] => b.php\r
-)
+)\r