1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00

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

This commit is contained in:
Greg Beaver
2009-02-21 03:15:47 +00:00
parent bd74089a4e
commit af84168de6
4 changed files with 9 additions and 4 deletions
Binary file not shown.
@@ -10,13 +10,15 @@ $d = dirname(__FILE__) . "/copyonwrite5";
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;
}
Binary file not shown.
@@ -10,13 +10,16 @@ $d = dirname(__FILE__) . "/copyonwrite6";
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;
}