dmitry Mon Mar 24 09:00:19 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/dir readdir_basic.phpt readdir_variation6.phpt Log: Fixed tests (file order is undefined, so we need to sort() them) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/readdir_basic.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/standard/tests/dir/readdir_basic.phpt diff -u php-src/ext/standard/tests/dir/readdir_basic.phpt:1.1.2.1 php-src/ext/standard/tests/dir/readdir_basic.phpt:1.1.2.2 --- php-src/ext/standard/tests/dir/readdir_basic.phpt:1.1.2.1 Tue Mar 4 17:06:46 2008 +++ php-src/ext/standard/tests/dir/readdir_basic.phpt Mon Mar 24 09:00:18 2008 @@ -23,13 +23,23 @@ echo "\n-- Call readdir() with \$path argument --\n"; var_dump($dh = opendir($path)); +$a = array(); while( FALSE !== ($file = readdir($dh)) ) { + $a[] = $file; +} +sort($a); +foreach($a as $file) { var_dump($file); } echo "\n-- Call readdir() without \$path argument --\n"; var_dump($dh = opendir($path)); +$a = array(); while( FALSE !== ( $file = readdir() ) ) { + $a[] = $file; +} +sort($a); +foreach($a as $file) { var_dump($file); } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/readdir_variation6.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/standard/tests/dir/readdir_variation6.phpt diff -u php-src/ext/standard/tests/dir/readdir_variation6.phpt:1.1.2.1 php-src/ext/standard/tests/dir/readdir_variation6.phpt:1.1.2.2 --- php-src/ext/standard/tests/dir/readdir_variation6.phpt:1.1.2.1 Tue Mar 4 17:06:46 2008 +++ php-src/ext/standard/tests/dir/readdir_variation6.phpt Mon Mar 24 09:00:18 2008 @@ -31,12 +31,22 @@ opendir($dir_path); echo "\n-- Reading Directory Contents with Previous Handle --\n"; +$a = array(); while (FALSE !== ($file = readdir($dir_handle1))) { + $a[] = $file; +} +sort($a); +foreach ($a as $file) { var_dump($file); } echo "\n-- Reading Directory Contents with Current Handle (no arguments supplied) --\n"; +$a = array(); while (FALSE !== ($file = readdir())) { + $a[] = $file; +} +sort($a); +foreach ($a as $file) { var_dump($file); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php