Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix tests
  • Loading branch information
Raghubansh Kumar committed Aug 23, 2007
1 parent 0bd0d85 commit 6ff029a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ext/standard/tests/file/copy_variation15.phpt
@@ -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
Expand Down
10 changes: 10 additions & 0 deletions ext/standard/tests/file/copy_variation9.phpt
Expand Up @@ -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
Expand Down

0 comments on commit 6ff029a

Please sign in to comment.