mirror of
https://github.com/php-win-ext/php-rar.git
synced 2026-04-27 14:23:14 +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
766 B
PHP
26 lines
766 B
PHP
--TEST--
|
|
RarArchive::open() volume callback long return (case MAXPATHLEN <= NM)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!defined("PHP_MAXPATHLEN"))
|
|
define("PHP_MAXPATHLEN", RAR_MAXPATHLEN);
|
|
if (!(PHP_MAXPATHLEN <= 1024))
|
|
die("skip; this test is for systems where MAXPATHLEN <= 1024");
|
|
--FILE--
|
|
<?php
|
|
if (!defined("PHP_MAXPATHLEN"))
|
|
define("PHP_MAXPATHLEN", RAR_MAXPATHLEN);
|
|
|
|
$fn = dirname(__FILE__) . '/multi_broken.part1.rar';
|
|
|
|
function testA($vol) { if ($vol[0] != 'a') return str_repeat("a", PHP_MAXPATHLEN); }
|
|
$rar = RarArchive::open($fn, null, 'testA');
|
|
$rar->getEntries();
|
|
|
|
echo "Done.\n";
|
|
--EXPECTF--
|
|
Warning: RarArchive::getEntries(): Cound not expand filename aaaa%s in %s on line %d
|
|
|
|
Warning: RarArchive::getEntries(): ERAR_EOPEN (file open error) in %s on line %d
|
|
Done.
|