philip Tue, 24 May 2011 23:27:49 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=311404
Log: Updated test. touch() emits E_WARNING for bogus values. Updated 5.3 test to look the same. Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/tests/file/005_variation2.phpt U php/php-src/branches/PHP_5_4/ext/standard/tests/file/005_variation2.phpt U php/php-src/trunk/ext/standard/tests/file/005_variation2.phpt Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/file/005_variation2.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/tests/file/005_variation2.phpt 2011-05-24 22:34:07 UTC (rev 311403) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/005_variation2.phpt 2011-05-24 23:27:49 UTC (rev 311404) @@ -49,12 +49,18 @@ echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; echo "\n*** testing touch ***\n"; -var_dump(touch(NULL)); -var_dump(touch(false)); -var_dump(touch('')); -var_dump(touch(' ')); -var_dump(touch('|')); +$a = touch(NULL); +$b = touch(false); +$c = touch(''); +$d = touch(' '); +$e = touch('|'); +var_dump($a); +var_dump($b); +var_dump($c); +var_dump($d); +var_dump($e); + echo "\n*** testing file info ***"; stat_fn(NULL); stat_fn(false); @@ -72,14 +78,14 @@ *** testing touch *** -Warning: touch(): Unable to create file because %s in %s on line %d -bool(false) +Warning: touch(): Unable to create file because No such file or directory in %s on line %d -Warning: touch(): Unable to create file because %s in %s on line %d -bool(false) +Warning: touch(): Unable to create file because No such file or directory in %s on line %d -Warning: touch(): Unable to create file because %s 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(true) bool(true) Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/file/005_variation2.phpt =================================================================== --- php/php-src/branches/PHP_5_4/ext/standard/tests/file/005_variation2.phpt 2011-05-24 22:34:07 UTC (rev 311403) +++ php/php-src/branches/PHP_5_4/ext/standard/tests/file/005_variation2.phpt 2011-05-24 23:27:49 UTC (rev 311404) @@ -49,12 +49,18 @@ echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; echo "\n*** testing touch ***\n"; -var_dump(touch(NULL)); -var_dump(touch(false)); -var_dump(touch('')); -var_dump(touch(' ')); -var_dump(touch('|')); +$a = touch(NULL); +$b = touch(false); +$c = touch(''); +$d = touch(' '); +$e = touch('|'); +var_dump($a); +var_dump($b); +var_dump($c); +var_dump($d); +var_dump($e); + echo "\n*** testing file info ***"; stat_fn(NULL); stat_fn(false); @@ -71,6 +77,12 @@ *** Testing fileattime(), filemtime(), filectime() & touch() : usage variations *** *** 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) Modified: php/php-src/trunk/ext/standard/tests/file/005_variation2.phpt =================================================================== --- php/php-src/trunk/ext/standard/tests/file/005_variation2.phpt 2011-05-24 22:34:07 UTC (rev 311403) +++ php/php-src/trunk/ext/standard/tests/file/005_variation2.phpt 2011-05-24 23:27:49 UTC (rev 311404) @@ -49,12 +49,18 @@ echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; echo "\n*** testing touch ***\n"; -var_dump(touch(NULL)); -var_dump(touch(false)); -var_dump(touch('')); -var_dump(touch(' ')); -var_dump(touch('|')); +$a = touch(NULL); +$b = touch(false); +$c = touch(''); +$d = touch(' '); +$e = touch('|'); +var_dump($a); +var_dump($b); +var_dump($c); +var_dump($d); +var_dump($e); + echo "\n*** testing file info ***"; stat_fn(NULL); stat_fn(false); @@ -71,6 +77,12 @@ *** Testing fileattime(), filemtime(), filectime() & touch() : usage variations *** *** 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)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php