Annotation of embedaddon/php/ext/phar/tests/016b.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar::mapPhar invalid file (gzipped file length is too short)
3: --SKIPIF--
4: <?php if (!extension_loaded("phar")) die("skip");?>
5: <?php if (!extension_loaded("zlib")) die("skip zlib not present"); ?>
6: --INI--
7: phar.require_hash=0
8: --FILE--
9: <?php
10: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
11: $pname = 'phar://' . $fname;
12: $file = "<?php __HALT_COMPILER(); ?>";
13: // file length is too short
14:
15: $files = array();
16: $files['a'] = array('cont'=>'a','flags'=>0x00001000, 'clen' => 1);
17: include 'files/phar_test.inc';
18:
19: echo file_get_contents($pname . '/a');
20: ?>
21: --CLEAN--
22: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
23: --EXPECTF--
24: Warning: file_get_contents(phar://%s/a): failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "a") in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>