mirror of
https://github.com/php-win-ext/php-rar.git
synced 2026-03-25 21:42:06 +01:00
Exposed UnRAR DLL API version in MINFO. Refactoring and a few other minor changes. git-svn-id: http://svn.php.net/repository/pecl/rar/trunk@298980 c90b9560-bf6c-de11-be94-00142212c4b1
27 lines
689 B
PHP
27 lines
689 B
PHP
--TEST--
|
|
RarEntry::getUnpackedSize() on platforms with 32-bit longs
|
|
--SKIPIF--
|
|
<?php
|
|
if(!extension_loaded("rar")) die("skip");
|
|
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
|
|
--FILE--
|
|
<?php
|
|
$fn1 = dirname(__FILE__) . '/sparsefiles_rar.rar';
|
|
$fn2 = dirname(__FILE__) . '/sparsefiles.tmp.rar';
|
|
$rarF = RarArchive::open($fn1);
|
|
$t = $rarF->getEntries();
|
|
reset($t)->extract(false, $fn2);
|
|
$rarF2 = RarArchive::open($fn2);
|
|
$t = $rarF2->getEntries();
|
|
var_dump($t[0]->getUnpackedSize());
|
|
var_dump($t[1]->getUnpackedSize());
|
|
echo "Done.\n";
|
|
--CLEAN--
|
|
<?php
|
|
$fn2 = dirname(__FILE__) . '/sparsefiles.tmp.rar';
|
|
@unlink($fn2);
|
|
--EXPECTF--
|
|
int(2147483647)
|
|
int(2147483647)
|
|
Done.
|