cellog Sat Feb 21 03:15:47 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar/tests/cache_list/files write5.phar write5.phar.inc write6.phar write6.phar.inc Log: fix faulty logic in tests, needed to use ksort instead of asort and to sort output. These tests failed on some systems with non-case sensitive filesystem sorting http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write5.phar?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write5.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write5.phar.inc?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write5.phar.inc diff -u php-src/ext/phar/tests/cache_list/files/write5.phar.inc:1.1.2.1 php-src/ext/phar/tests/cache_list/files/write5.phar.inc:1.1.2.2 --- php-src/ext/phar/tests/cache_list/files/write5.phar.inc:1.1.2.1 Mon Oct 13 04:21:09 2008 +++ php-src/ext/phar/tests/cache_list/files/write5.phar.inc Sat Feb 21 03:15:46 2009 @@ -10,13 +10,15 @@ mkdir($d); file_put_contents($d . "/file1", "file1\n"); file_put_contents($d . "/file2", "file2\n"); -var_dump($phar->buildFromDirectory($d)); +$arr = $phar->buildFromDirectory($d); +ksort($arr); +var_dump($arr); $phar2 = new Phar(__FILE__); $arr = array(); foreach ($phar2 as $name => $file) { $arr[$name] = $file->getContent(); } -asort($arr); +ksort($arr); foreach ($arr as $name => $content) { echo $name, " ", $content; } http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write6.phar?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write6.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write6.phar.inc?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write6.phar.inc diff -u php-src/ext/phar/tests/cache_list/files/write6.phar.inc:1.1.2.2 php-src/ext/phar/tests/cache_list/files/write6.phar.inc:1.1.2.3 --- php-src/ext/phar/tests/cache_list/files/write6.phar.inc:1.1.2.2 Sun Feb 15 21:43:39 2009 +++ php-src/ext/phar/tests/cache_list/files/write6.phar.inc Sat Feb 21 03:15:47 2009 @@ -10,13 +10,16 @@ mkdir($d); file_put_contents($d . "/file1", "file1\n"); file_put_contents($d . "/file2", "file2\n"); -var_dump($phar->buildFromIterator(new RecursiveDirectoryIterator($d, RecursiveDirectoryIterator::SKIP_DOTS),$d)); +$arr = $phar->buildFromIterator(new RecursiveDirectoryIterator($d, RecursiveDirectoryIterator::SKIP_DOTS),$d); +$arr = $phar->buildFromDirectory($d); +ksort($arr); +var_dump($arr); $phar2 = new Phar(__FILE__); $arr = array(); foreach ($phar2 as $name => $file) { $arr[$name] = $file->getContent(); } -asort($arr); +ksort($arr); foreach ($arr as $name => $content) { echo $name, " ", $content; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php