xref: /PHP-8.2/ext/phar/tests/tar/bug49910.phpt (revision 74859783)
1--TEST--
2Bug #49910: no support for ././@LongLink for long filenames in phar tar support
3--EXTENSIONS--
4phar
5zlib
6--FILE--
7<?php
8$fname = str_replace('\\', '/', __DIR__ . '/files/Structures_Graph-1.0.3.tgz');
9$tar = new PharData($fname);
10$files = array();
11foreach (new RecursiveIteratorIterator($tar) as $file) {
12    $files[] = str_replace($fname, '*', $file->getPathName());
13}
14print_r($files);
15?>
16--EXPECT--
17Array
18(
19    [0] => phar://*/Structures_Graph-1.0.3/LICENSE
20    [1] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Manipulator/AcyclicTest.php
21    [2] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Manipulator/TopologicalSorter.php
22    [3] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Node.php
23    [4] => phar://*/Structures_Graph-1.0.3/Structures/Graph.php
24    [5] => phar://*/Structures_Graph-1.0.3/docs/generate.sh
25    [6] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph.html
26    [7] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html
27    [8] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html
28    [9] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Node.html
29    [10] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html
30    [11] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html
31    [12] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Node_php.html
32    [13] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_php.html
33    [14] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html
34    [15] => phar://*/Structures_Graph-1.0.3/docs/html/classtrees_Structures_Graph.html
35    [16] => phar://*/Structures_Graph-1.0.3/docs/html/elementindex.html
36    [17] => phar://*/Structures_Graph-1.0.3/docs/html/elementindex_Structures_Graph.html
37    [18] => phar://*/Structures_Graph-1.0.3/docs/html/errors.html
38    [19] => phar://*/Structures_Graph-1.0.3/docs/html/index.html
39    [20] => phar://*/Structures_Graph-1.0.3/docs/html/li_Structures_Graph.html
40    [21] => phar://*/Structures_Graph-1.0.3/docs/html/media/banner.css
41    [22] => phar://*/Structures_Graph-1.0.3/docs/html/media/stylesheet.css
42    [23] => phar://*/Structures_Graph-1.0.3/docs/html/packages.html
43    [24] => phar://*/Structures_Graph-1.0.3/docs/html/todolist.html
44    [25] => phar://*/Structures_Graph-1.0.3/docs/tutorials/Structures_Graph/Structures_Graph.pkg
45    [26] => phar://*/Structures_Graph-1.0.3/tests/AllTests.php
46    [27] => phar://*/Structures_Graph-1.0.3/tests/testCase/BasicGraph.php
47    [28] => phar://*/package.xml
48)
49