mirror of
https://github.com/php-win-ext/php-rar.git
synced 2026-04-28 23:03:12 +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.
24 lines
484 B
PHP
24 lines
484 B
PHP
--TEST--
|
|
RarEntry::getStream handles files with non-unique entry names
|
|
--FILE--
|
|
<?php
|
|
|
|
$file = RarArchive::open(dirname(__FILE__) . '/repeated_name.rar');
|
|
|
|
foreach ($file as $e) {
|
|
$stream = $e->getStream();
|
|
if ($stream) {
|
|
echo $e->getPosition() . ". $e\n";
|
|
echo stream_get_contents($stream);
|
|
echo "\n";
|
|
}
|
|
}
|
|
|
|
echo "Done.\n";
|
|
--EXPECTF--
|
|
0. RarEntry for file "file.txt" (ae2a88a7)
|
|
Content of first file.
|
|
1. RarEntry for file "file.txt" (771df243)
|
|
Content of second file.
|
|
Done.
|