mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
- fix test
This commit is contained in:
parent
ebd24fc10f
commit
3db4fe36a4
1 changed files with 6 additions and 9 deletions
|
@ -20,8 +20,9 @@ echo "*** Testing unlink() : variation ***\n";
|
||||||
|
|
||||||
$workDir = "unlinkVar9.tmp";
|
$workDir = "unlinkVar9.tmp";
|
||||||
$tmpFile = "file.tmp";
|
$tmpFile = "file.tmp";
|
||||||
|
chdir(__DIR__);
|
||||||
mkdir($workDir);
|
mkdir($workDir);
|
||||||
$cwd = getcwd();
|
$cwd = __DIR__;
|
||||||
$unixifiedFile = '/'.substr(str_replace('\\','/',$cwd).'/'.$workDir.'/'.$tmpFile, 3);
|
$unixifiedFile = '/'.substr(str_replace('\\','/',$cwd).'/'.$workDir.'/'.$tmpFile, 3);
|
||||||
|
|
||||||
$files = array(
|
$files = array(
|
||||||
|
@ -57,12 +58,8 @@ $files = array(
|
||||||
|
|
||||||
|
|
||||||
foreach($files as $fileToUnlink) {
|
foreach($files as $fileToUnlink) {
|
||||||
test_realfile($workDir.'/'.$tmpFile, $fileToUnlink);
|
$file = $workDir.'/'.$tmpFile;
|
||||||
}
|
$tounlink = $fileToUnlink;
|
||||||
|
|
||||||
rmdir($workDir);
|
|
||||||
|
|
||||||
function test_realfile($file, $tounlink) {
|
|
||||||
touch($file);
|
touch($file);
|
||||||
echo "-- removing $tounlink --\n";
|
echo "-- removing $tounlink --\n";
|
||||||
$res = unlink($tounlink);
|
$res = unlink($tounlink);
|
||||||
|
@ -79,7 +76,7 @@ function test_realfile($file, $tounlink) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rmdir($workDir);
|
||||||
?>
|
?>
|
||||||
===DONE===
|
===DONE===
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue