Annotation of embedaddon/php/ext/phar/tests/zip/largezip.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar: large zip file (zip edge cases)
3: --SKIPIF--
4: <?php if (!extension_loaded("phar")) die("skip");?>
5: --INI--
6: phar.require_hash=0
7: phar.readonly=0
8: --FILE--
9: <?php
10: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php';
11: $fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php';
12: $pname = 'phar://' . $fname;
13: $pname2 = 'phar://' . $fname2;
14:
15: $p = new Phar($fname);
16: $p['big'] = str_repeat(str_repeat('hi', 100), 1000);
17: $p['big2'] = str_repeat(str_repeat('hi', 100), 1000);
18:
19: copy($fname, $fname2);
20: $p2 = new Phar($fname2);
21: var_dump(strlen($p2['big']->getContent()));
22: ?>
23: ===DONE===
24: --CLEAN--
25: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?>
26: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?>
27: --EXPECT--
28: int(200000)
29: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>