Annotation of embedaddon/php/ext/phar/tests/008.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Phar::mapPhar truncated manifest (not enough for manifest length)
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded("phar")) die("skip");?>
        !             5: --FILE--
        !             6: <?php
        !             7: $file = "<?php
        !             8: Phar::mapPhar('hio');
        !             9: __HALT_COMPILER(); ?>";
        !            10: $file .= pack('V', 500) . 'notenough';
        !            11: file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file);
        !            12: try {
        !            13: include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
        !            14: } catch (Exception $e) {
        !            15: echo $e->getMessage();
        !            16: }
        !            17: ?>
        !            18: --CLEAN--
        !            19: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
        !            20: --EXPECTF--
        !            21: internal corruption of phar "%s" (truncated manifest header)

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