Annotation of embedaddon/php/ext/phar/tests/zip/corrupt_001.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Phar: corrupted zip (count mismatch)
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("phar")) die("skip"); ?>
                      5: <?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
                      6: --FILE--
                      7: <?php
                      8: try {
                      9:        new PharData(dirname(__FILE__) . '/files/count1.zip');
                     10: } catch (Exception $e) {
                     11:        echo $e->getMessage() . "\n";
                     12: }
                     13: try {
                     14:        new PharData(dirname(__FILE__) . '/files/count2.zip');
                     15: } catch (Exception $e) {
                     16:        echo $e->getMessage() . "\n";
                     17: }
                     18: ?>
                     19: ===DONE===
                     20: --EXPECTF--
                     21: phar error: corrupt zip archive, conflicting file count in end of central directory record in zip-based phar "%scount1.zip"
                     22: phar error: corrupt zip archive, conflicting file count in end of central directory record in zip-based phar "%scount2.zip"
                     23: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>