xref: /PHP-8.1/ext/phar/tests/bug74196.phpt (revision 74859783)
1--TEST--
2PHP bug #74196: PharData->decompress() does not correctly support dot names
3--EXTENSIONS--
4phar
5zlib
6--INI--
7phar.require_hash=0
8phar.readonly=0
9--FILE--
10<?php
11$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.2.3.phar.tar.gz';
12$decompressed_name = str_replace( ".gz", "",  $fname);
13var_dump(file_exists($fname));
14
15$phar = new Phar($fname);
16$phar->decompress();
17var_dump(file_exists($decompressed_name));
18unlink($decompressed_name);
19
20?>
21--EXPECT--
22bool(true)
23bool(true)
24