Annotation of embedaddon/php/ext/phar/tests/bug46060.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar: Bug #46060: addEmptyDir() breaks
3: --SKIPIF--
4: <?php if (!extension_loaded("phar")) die("skip"); ?>
5: <?php if (getenv('SKIP_SLOW_TESTS')) die('skip'); ?>
6: --INI--
7: phar.require_hash=0
8: --FILE--
9: <?php
10: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
11: $fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.tar';
12:
13: $phar = new PharData($fname);
14: $phar->addEmptyDir('blah/');
15: $phar->addFromString('test/', '');
16:
17: copy($fname, $fname2);
18: $phar = new PharData($fname2);
19:
20: var_dump($phar['blah']->isDir(), $phar['test']->isDir());
21: ?>
22: ===DONE===
23: --CLEAN--
24: <?php
25: unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
26: unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.tar');
27: __HALT_COMPILER();
28: ?>
29: --EXPECT--
30: bool(true)
31: bool(false)
32: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>