Browse Source

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

experimental/5.3-FPM
Greg Beaver 17 years ago
parent
commit
af84168de6
  1. BIN
      ext/phar/tests/cache_list/files/write5.phar
  2. 6
      ext/phar/tests/cache_list/files/write5.phar.inc
  3. BIN
      ext/phar/tests/cache_list/files/write6.phar
  4. 7
      ext/phar/tests/cache_list/files/write6.phar.inc

BIN
ext/phar/tests/cache_list/files/write5.phar

6
ext/phar/tests/cache_list/files/write5.phar.inc

@ -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;
}

BIN
ext/phar/tests/cache_list/files/write6.phar

7
ext/phar/tests/cache_list/files/write6.phar.inc

@ -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;
}

Loading…
Cancel
Save