mirror of
https://github.com/php/php-src.git
synced 2024-09-27 12:57:26 +00:00
af5e2eaf8d
* pull-request/320: this is test 5 not 6 fix race condition more shared names that create race conditions change to a unique filename more shared filenames yet another shared filename don't share a filename to stop race conditions fix race condition for 2-4 and normalize names for others fix race condition when running tests in parallel clean up after test Fix #64572: Clean up after the test Fix #64572: Clean up after the test
25 lines
404 B
PHP
25 lines
404 B
PHP
--TEST--
|
|
touch() - ensure touch does not delete existing file.
|
|
--CREDITS--
|
|
Dave Kelsey <d_kelsey@uk.ibm.com>
|
|
--FILE--
|
|
<?php
|
|
|
|
|
|
$filename = dirname(__FILE__)."/touch_variation2.dat";
|
|
$fp=fopen($filename,"w");
|
|
fwrite ($fp,"mydata");
|
|
fclose($fp);
|
|
|
|
var_dump(touch($filename, 101));
|
|
var_dump(file_get_contents($filename));
|
|
|
|
@unlink($filename);
|
|
echo "Done\n";
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
string(6) "mydata"
|
|
Done
|