cellog Sat Feb 21 03:15:57 2009 UTC
Modified files:
/php-src/ext/phar/tests/cache_list/files write5.phar
write5.phar.inc
write6.phar
write6.phar.inc
Log:
MFB: 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.2&r2=1.3&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.2&r2=1.3&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.2
php-src/ext/phar/tests/cache_list/files/write5.phar.inc:1.3
--- php-src/ext/phar/tests/cache_list/files/write5.phar.inc:1.2 Mon Oct 13
04:21:19 2008
+++ php-src/ext/phar/tests/cache_list/files/write5.phar.inc Sat Feb 21
03:15:57 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.3&r2=1.4&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.3&r2=1.4&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.3
php-src/ext/phar/tests/cache_list/files/write6.phar.inc:1.4
--- php-src/ext/phar/tests/cache_list/files/write6.phar.inc:1.3 Sun Feb 15
21:50:58 2009
+++ php-src/ext/phar/tests/cache_list/files/write6.phar.inc Sat Feb 21
03:15:57 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