1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 14:01:01 +02:00
Files
archived-php-src/ext/phar/tests/bug74196.phpt
Mitch Hagstrand a9fdf3d6b4 Fix for Bug 74196: PharData->decompress() does not correctly support dot names
1. Fixed phar_rename_archive to no longer remove everything after a "." in the filename
2. Removed unused "zend_bool compress" parameter
3. Added Test
4. Fixed tests that had a work around for this problem
2017-04-10 06:43:26 +01:00

24 lines
590 B
PHP

--TEST--
PHP bug #74196: PharData->decompress() does not correctly support dot names
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("zlib")) die("skip"); ?>
--INI--
phar.require_hash=0
phar.readonly=0
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.2.3.phar.tar.gz';
$decompressed_name = str_replace( ".gz", "", $fname);
var_dump(file_exists($fname));
$phar = new Phar($fname);
$phar->decompress();
var_dump(file_exists($decompressed_name));
unlink($decompressed_name);
?>
--EXPECTF--
bool(true)
bool(true)