From af84168de62f28fe5aceeb753aea0ab8aadf9ee8 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Sat, 21 Feb 2009 03:15:47 +0000 Subject: [PATCH] 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 --- ext/phar/tests/cache_list/files/write5.phar | Bin 538 -> 564 bytes ext/phar/tests/cache_list/files/write5.phar.inc | 6 ++++-- ext/phar/tests/cache_list/files/write6.phar | Bin 611 -> 675 bytes 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 index b3a318b5a2e99d3c40b83b76130d1c4e5e5c100e..52635b41ac3fd7fdce6a056690d956a7ff4c052b 100644 GIT binary patch delta 107 zcmbQmvV~>BMs}6Nq9O%bg^9alWvscfi}Q<0G(bX{)?8(YMe!-6xdmYU#Ou|J*^`4A zrx+&`&i7J7gz*tY%D{oXa@Hc>CT@9?T333{_S6Z?`c589j}6 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 index 8aa92131e64199143352365b1c4f4e12f26a04b4..e3e4341c67917ab2f7ef03c663a24b71385049a9 100644 GIT binary patch delta 146 zcmaFNvY2(kMs}6Nq9O%bg^9b;oUFN^9F>BM#3Eh0q|(fs6t|-MT$jwE)Z~)w z6isWc?Be{Q5)F`AAg3&`C_be$w*btatiV{!m_2z8;}qi)1@k?b85kIJJKd6Fjg}rPQJr9#hAHgh9@%v14C6+{@ZPgKn4(G iWO99QHZe0c-B{OFIqzfPqWX1fnilFX0j1oXe4PNhD;$FW 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; } -- 2.50.1