xref: /PHP-7.1/ext/phar/tests/bug77586.phpt (revision e0f5d62b)
1--TEST--
2Bug #77586 Symbolic link names in tar-formatted phar must be less than 100 bytes.
3--SKIPIF--
4<?php if (!extension_loaded("phar") || true /* blocked by bug 65332 */) die("skip"); ?>
5--FILE--
6<?php
7$dir = __DIR__."/bug77586";
8$phar = new PharData($dir . "/bug77586.tar");
9$phar->buildFromDirectory($dir . "/files");
10?>
11--CLEAN--
12<?php
13$dir = __DIR__."/bug77586";
14unlink($dir . "/bug77586.tar");
15?>
16--EXPECTF--
17Fatal error: Uncaught PharException: tar-based phar "%s/bug77586.tar" cannot be created, link "%s" is too long for format %s
18Stack trace:
19#0 %s/bug77586.php(%d): PharData->buildFromDirectory('%s')
20#1 {main}
21  thrown in %s/bug77586.php %s on line %d
22