Annotation of embedaddon/php/ext/phar/tests/tar/links.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Phar: tar with hard link and symbolic link
3: --SKIPIF--
4: <?php if (!extension_loaded("phar")) die("skip"); ?>
5: --INI--
6: phar.require_hash=0
7: --FILE--
8: <?php
9: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar';
10: copy(dirname(__FILE__) . '/files/links.tar', $fname);
11: try {
12: $p = new PharData($fname);
13: } catch (Exception $e) {
14: echo $e->getMessage() . "\n";
15: }
16: var_dump($p['testit/link']->getContent());
17: var_dump($p['testit/hard']->getContent());
18: var_dump($p['testit/file']->getContent());
19: $p['testit/link'] = 'overwriting';
20: var_dump($p['testit/link']->getContent());
21: ?>
22: ===DONE===
23: --CLEAN--
24: <?php
25: unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar');
26: ?>
27: --EXPECT--
28: string(3) "hi
29: "
30: string(3) "hi
31: "
32: string(3) "hi
33: "
34: string(11) "overwriting"
35: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>