mirror of
https://github.com/php-win-ext/php-rar.git
synced 2026-04-26 13:58:05 +02:00
78b7a5f63b
Add a musl/LLVM Docker build environment for compiling portable Linux binaries that work on both musl and glibc systems, along with a minimal PHP Docker image for testing. Add CI workflows to build and publish these images to ghcr.io. Update test and build scripts to use the new Docker-based environment, and remove SKIPIF guards from tests since the extension is always present and doing otherwise would mask extension loading failures.
26 lines
647 B
PHP
26 lines
647 B
PHP
--TEST--
|
|
RarEntry::getUnpackedSize() on platforms with 32-bit longs
|
|
--SKIPIF--
|
|
<?php
|
|
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.
|