mirror of
https://github.com/php/php-src.git
synced 2025-08-21 01:45:16 +02:00
Updated test. touch() emits E_WARNING for bogus values. Updated 5.3 test to look the same.
This commit is contained in:
parent
708017dd3f
commit
76ec6924cb
1 changed files with 17 additions and 5 deletions
|
@ -49,11 +49,17 @@ function stat_fn( $filename ) {
|
||||||
|
|
||||||
echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n";
|
echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n";
|
||||||
echo "\n*** testing touch ***\n";
|
echo "\n*** testing touch ***\n";
|
||||||
var_dump(touch(NULL));
|
$a = touch(NULL);
|
||||||
var_dump(touch(false));
|
$b = touch(false);
|
||||||
var_dump(touch(''));
|
$c = touch('');
|
||||||
var_dump(touch(' '));
|
$d = touch(' ');
|
||||||
var_dump(touch('|'));
|
$e = touch('|');
|
||||||
|
|
||||||
|
var_dump($a);
|
||||||
|
var_dump($b);
|
||||||
|
var_dump($c);
|
||||||
|
var_dump($d);
|
||||||
|
var_dump($e);
|
||||||
|
|
||||||
echo "\n*** testing file info ***";
|
echo "\n*** testing file info ***";
|
||||||
stat_fn(NULL);
|
stat_fn(NULL);
|
||||||
|
@ -71,6 +77,12 @@ echo "Done";
|
||||||
*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***
|
*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***
|
||||||
|
|
||||||
*** testing touch ***
|
*** testing touch ***
|
||||||
|
|
||||||
|
Warning: touch(): Unable to create file because No such file or directory in %s on line %d
|
||||||
|
|
||||||
|
Warning: touch(): Unable to create file because No such file or directory in %s on line %d
|
||||||
|
|
||||||
|
Warning: touch(): Unable to create file because No such file or directory in %s on line %d
|
||||||
bool(false)
|
bool(false)
|
||||||
bool(false)
|
bool(false)
|
||||||
bool(false)
|
bool(false)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue