fix tests

This commit is contained in:
Raghubansh Kumar 2007-08-23 09:34:15 +00:00
parent 0bd0d85673
commit 6ff029a37d
2 changed files with 20 additions and 2 deletions

View File

@ -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

View File

@ -4,6 +4,16 @@ Test copy() function: usage variations - destination file access perms
<?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