pajoye Sun Aug 17 11:04:17 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/file file.inc stat_basic-win32.phpt stat_variation8-win32.phpt tempnam_variation3-win32.phpt touch.phpt Log: - fix or improve tests - add dump of the array_diff for compare_stats http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file.inc?r1=1.1.2.6&r2=1.1.2.6.2.1&diff_format=u Index: php-src/ext/standard/tests/file/file.inc diff -u php-src/ext/standard/tests/file/file.inc:1.1.2.6 php-src/ext/standard/tests/file/file.inc:1.1.2.6.2.1 --- php-src/ext/standard/tests/file/file.inc:1.1.2.6 Thu Jul 26 13:38:24 2007 +++ php-src/ext/standard/tests/file/file.inc Sun Aug 17 11:04:16 2008 @@ -638,6 +638,8 @@ // if the result is false(i.e values are not as expected), // dump the stat array so that easy to figure out the error if ( $result == false ) { + echo "\n Dumping diff between stat array 1 and 2...\n"; + var_dump(array_diff($stat1, $stat2)); echo "\n Dumping stat array 1...\n"; var_dump($stat1); echo "\n Dumping stat array 2...\n"; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_basic-win32.phpt?r1=1.1.2.1.2.1&r2=1.1.2.1.2.2&diff_format=u Index: php-src/ext/standard/tests/file/stat_basic-win32.phpt diff -u php-src/ext/standard/tests/file/stat_basic-win32.phpt:1.1.2.1.2.1 php-src/ext/standard/tests/file/stat_basic-win32.phpt:1.1.2.1.2.2 --- php-src/ext/standard/tests/file/stat_basic-win32.phpt:1.1.2.1.2.1 Mon Nov 5 17:43:21 2007 +++ php-src/ext/standard/tests/file/stat_basic-win32.phpt Sun Aug 17 11:04:16 2008 @@ -80,15 +80,15 @@ [0]=> int(%d) [1]=> - int(%d) + int(0) [2]=> int(%d) [3]=> int(%d) [4]=> - int(%d) + int(0) [5]=> - int(%d) + int(0) [6]=> int(%d) [7]=> @@ -106,15 +106,15 @@ ["dev"]=> int(%d) ["ino"]=> - int(%d) + int(0) ["mode"]=> int(%d) ["nlink"]=> int(%d) ["uid"]=> - int(%d) + int(0) ["gid"]=> - int(%d) + int(0) ["rdev"]=> int(%d) ["size"]=> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_variation8-win32.phpt?r1=1.1.2.2.2.1&r2=1.1.2.2.2.2&diff_format=u Index: php-src/ext/standard/tests/file/stat_variation8-win32.phpt diff -u php-src/ext/standard/tests/file/stat_variation8-win32.phpt:1.1.2.2.2.1 php-src/ext/standard/tests/file/stat_variation8-win32.phpt:1.1.2.2.2.2 --- php-src/ext/standard/tests/file/stat_variation8-win32.phpt:1.1.2.2.2.1 Mon Nov 5 17:43:21 2007 +++ php-src/ext/standard/tests/file/stat_variation8-win32.phpt Sun Aug 17 11:04:16 2008 @@ -34,7 +34,7 @@ $file_handle = fopen($filename, "w"); fclose($file_handle); -clearstatcache(); +clearstatcache(true, $filename); $old_stat = stat($filename); // clear the cache sleep(2); @@ -44,7 +44,7 @@ var_dump( ftruncate($file_handle, 512) ); // truncate it fclose($file_handle); -clearstatcache(); +clearstatcache(true, $filename); $new_stat = stat($filename); // compare self stats @@ -56,7 +56,7 @@ var_dump( compare_stats($old_stat, $new_stat, $affected_members, '!=') ); // clear the stat -clearstatcache(); // clear previous size value in cache +clearstatcache(true, $filename); // clear previous size value in cache echo "\n*** Done ***"; ?> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt?r1=1.1.2.2&r2=1.1.2.2.2.1&diff_format=u Index: php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt diff -u php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt:1.1.2.2 php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt:1.1.2.2.2.1 --- php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt:1.1.2.2 Fri Aug 10 12:11:46 2007 +++ php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt Sun Aug 17 11:04:16 2008 @@ -78,9 +78,10 @@ File permissions are => 100666 -- Iteration 7 -- -Notice: Array to string conversion in %s on line %d -File name is => %s -File permissions are => 100666 +Warning: tempnam() expects parameter 2 to be string, array given in %s on line %d +-- File is not created -- + +Warning: unlink(): %s in %s on line %d -- Iteration 8 -- File name is => %s File permissions are => 100666 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/touch.phpt?r1=1.1.2.3.2.1&r2=1.1.2.3.2.2&diff_format=u Index: php-src/ext/standard/tests/file/touch.phpt diff -u php-src/ext/standard/tests/file/touch.phpt:1.1.2.3.2.1 php-src/ext/standard/tests/file/touch.phpt:1.1.2.3.2.2 --- php-src/ext/standard/tests/file/touch.phpt:1.1.2.3.2.1 Mon Nov 5 17:43:21 2007 +++ php-src/ext/standard/tests/file/touch.phpt Sun Aug 17 11:04:16 2008 @@ -42,7 +42,7 @@ bool(true) int(100) bool(true) -int(100) +int(-100) Warning: touch(): Unable to create file /no/such/file/or/directory because No such file or directory in %s on line %d bool(false)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php