diff options
| author | Greg Beaver <cellog@php.net> | 2009-02-21 03:15:47 +0000 |
|---|---|---|
| committer | Greg Beaver <cellog@php.net> | 2009-02-21 03:15:47 +0000 |
| commit | af84168de62f28fe5aceeb753aea0ab8aadf9ee8 (patch) | |
| tree | 76d989b605f9a69fb0aa365df55d0bd0efe04daf | |
| parent | bd74089a4e073a3a28b6525138af53b941edc273 (diff) | |
| download | php-git-af84168de62f28fe5aceeb753aea0ab8aadf9ee8.tar.gz | |
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
| -rw-r--r-- | ext/phar/tests/cache_list/files/write5.phar | bin | 538 -> 564 bytes | |||
| -rw-r--r-- | ext/phar/tests/cache_list/files/write5.phar.inc | 6 | ||||
| -rw-r--r-- | ext/phar/tests/cache_list/files/write6.phar | bin | 611 -> 675 bytes | |||
| -rw-r--r-- | ext/phar/tests/cache_list/files/write6.phar.inc | 7 |
4 files changed, 9 insertions, 4 deletions
diff --git a/ext/phar/tests/cache_list/files/write5.phar b/ext/phar/tests/cache_list/files/write5.phar Binary files differindex b3a318b5a2..52635b41ac 100644 --- a/ext/phar/tests/cache_list/files/write5.phar +++ b/ext/phar/tests/cache_list/files/write5.phar diff --git a/ext/phar/tests/cache_list/files/write5.phar.inc b/ext/phar/tests/cache_list/files/write5.phar.inc index 04a4dfe18d..5e7b9bb886 100644 --- a/ext/phar/tests/cache_list/files/write5.phar.inc +++ b/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; } diff --git a/ext/phar/tests/cache_list/files/write6.phar b/ext/phar/tests/cache_list/files/write6.phar Binary files differindex 8aa92131e6..e3e4341c67 100644 --- a/ext/phar/tests/cache_list/files/write6.phar +++ b/ext/phar/tests/cache_list/files/write6.phar diff --git a/ext/phar/tests/cache_list/files/write6.phar.inc b/ext/phar/tests/cache_list/files/write6.phar.inc index 39b1e8158c..3ba5db3c54 100644 --- a/ext/phar/tests/cache_list/files/write6.phar.inc +++ b/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; } |
