xref: /PHP-8.0/ext/phar/tests/bug74196.phpt (revision 26dfce7f)
1--TEST--
2PHP bug #74196: PharData->decompress() does not correctly support dot names
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5<?php if (!extension_loaded("zlib")) die("skip"); ?>
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