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