pajoye                                   Sat, 30 Jan 2010 21:24:04 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=294261

Log:
- fix skip clauses

Changed paths:
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_links/bug48746_2.phpt
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_links/bug48746_3.phpt
    U   php/php-src/trunk/ext/standard/tests/file/windows_links/bug48746_2.phpt
    U   php/php-src/trunk/ext/standard/tests/file/windows_links/bug48746_3.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_links/bug48746_2.phpt
===================================================================
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_links/bug48746_2.phpt
  2010-01-30 21:12:20 UTC (rev 294260)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_links/bug48746_2.phpt
  2010-01-30 21:24:04 UTC (rev 294261)
@@ -9,11 +9,11 @@
 if(substr(PHP_OS, 0, 3) != 'WIN' ) {
     die('skip windows only test');
 }
-$cmd = "mklink.exe /?";
-$ret = @exec($cmd, $output, $return_val);
-if (count($output) == 0) {
-    die("mklink.exe not found in PATH");
+$ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 2>&1', $out);
+if (strpos($ret, 'privilege')) {
+       die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');
 }
+unlink('mklink bug48746_tmp.lnk');
 ?>
 --FILE--
 <?php

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_links/bug48746_3.phpt
===================================================================
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_links/bug48746_3.phpt
  2010-01-30 21:12:20 UTC (rev 294260)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/file/windows_links/bug48746_3.phpt
  2010-01-30 21:24:04 UTC (rev 294261)
@@ -7,13 +7,13 @@
 --SKIPIF--
 <?php
 if(substr(PHP_OS, 0, 3) != 'WIN' ) {
-    die('skip windows only test');
+       die('skip windows only test');
 }
-$cmd = "junction.exe /?";
-$ret = @exec($cmd, $output, $return_val);
-if (count($output) == 0) {
-    die("junction.exe not found in PATH");
+$ret = exec('junction /? 2>&1', $out);
+if (strpos($out[0], 'recognized')) {
+       die('skip. junction.exe not found in PATH.');
 }
+
 ?>
 --FILE--
 <?php

Modified: 
php/php-src/trunk/ext/standard/tests/file/windows_links/bug48746_2.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/file/windows_links/bug48746_2.phpt     
2010-01-30 21:12:20 UTC (rev 294260)
+++ php/php-src/trunk/ext/standard/tests/file/windows_links/bug48746_2.phpt     
2010-01-30 21:24:04 UTC (rev 294261)
@@ -9,11 +9,11 @@
 if(substr(PHP_OS, 0, 3) != 'WIN' ) {
     die('skip windows only test');
 }
-$cmd = "mklink.exe /?";
-$ret = @exec($cmd, $output, $return_val);
-if (count($output) == 0) {
-    die("mklink.exe not found in PATH");
+$ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 2>&1', $out);
+if (strpos($ret, 'privilege')) {
+       die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');
 }
+unlink('mklink bug48746_tmp.lnk');
 ?>
 --FILE--
 <?php
@@ -63,4 +63,4 @@
     [1] => ..
     [2] => a.php
     [3] => b.php
-)
+)

Modified: 
php/php-src/trunk/ext/standard/tests/file/windows_links/bug48746_3.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/file/windows_links/bug48746_3.phpt     
2010-01-30 21:12:20 UTC (rev 294260)
+++ php/php-src/trunk/ext/standard/tests/file/windows_links/bug48746_3.phpt     
2010-01-30 21:24:04 UTC (rev 294261)
@@ -7,13 +7,13 @@
 --SKIPIF--
 <?php
 if(substr(PHP_OS, 0, 3) != 'WIN' ) {
-    die('skip windows only test');
+       die('skip windows only test');
 }
-$cmd = "junction.exe /?";
-$ret = @exec($cmd, $output, $return_val);
-if (count($output) == 0) {
-    die("junction.exe not found in PATH");
+$ret = exec('junction /? 2>&1', $out);
+if (strpos($out[0], 'recognized')) {
+       die('skip. junction.exe not found in PATH.');
 }
+
 ?>
 --FILE--
 <?php
@@ -45,4 +45,4 @@
     [1] => ..
     [2] => a.php
     [3] => b.php
-)
+)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to