kraghuba Thu Aug 23 09:34:15 2007 UTC
Modified files:
/php-src/ext/standard/tests/file copy_variation9.phpt
copy_variation15.phpt
Log:
fix tests
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation9.phpt
diff -u php-src/ext/standard/tests/file/copy_variation9.phpt:1.3
php-src/ext/standard/tests/file/copy_variation9.phpt:1.4
--- php-src/ext/standard/tests/file/copy_variation9.phpt:1.3 Mon Aug 20
03:40:41 2007
+++ php-src/ext/standard/tests/file/copy_variation9.phpt Thu Aug 23
09:34:15 2007
@@ -4,6 +4,16 @@
<?php
if( (stristr(PHP_OS, "Mac")) || (substr(PHP_OS, 0, 3) == "WIN") )
die("skip do not run on Win/MacOS");
+
+// Skip if being run by root (files are always readable, writeable and
executable)
+$filename = dirname(__FILE__)."/copy_variation9_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
?>
--FILE--
<?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation15.phpt
diff -u php-src/ext/standard/tests/file/copy_variation15.phpt:1.3
php-src/ext/standard/tests/file/copy_variation15.phpt:1.4
--- php-src/ext/standard/tests/file/copy_variation15.phpt:1.3 Mon Aug 20
03:40:41 2007
+++ php-src/ext/standard/tests/file/copy_variation15.phpt Thu Aug 23
09:34:15 2007
@@ -1,10 +1,18 @@
--TEST--
Test copy() function: usage variations - destination dir access perms
--SKIPIF--
---SKIPIF--
<?php
-if( (substr(PHP_OS, 0, 3) == "WIN") || (stristr(PHP_OS, "Mac")) )
+if( (stristr(PHP_OS, "Mac")) || (substr(PHP_OS, 0, 3) == "WIN") )
die("skip do not run on Win/MacOS");
+// Skip if being run by root (files are always readable, writeable and
executable)
+$filename = dirname(__FILE__)."/copy_variation15_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
?>
--FILE--
<?php
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php