mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
fix tests
This commit is contained in:
parent
0bd0d85673
commit
6ff029a37d
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user