mirror of
https://github.com/php-win-ext/php-rar.git
synced 2026-04-28 14:53: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.
36 lines
615 B
PHP
36 lines
615 B
PHP
--TEST--
|
|
fopen modes 'r' and 'rb' are the only allowed
|
|
--FILE--
|
|
<?php
|
|
|
|
$file = 'rar://' . rawurlencode(dirname(__FILE__) . '/linux_rar.rar')
|
|
. '#/plain.txt';
|
|
|
|
echo "Testing 'r'\n";
|
|
$fd = fopen($file, 'r');
|
|
if ($fd) echo "opened\n\n";
|
|
|
|
echo "Testing 'rb'\n";
|
|
$fd = fopen($file, 'rb');
|
|
if ($fd) echo "opened\n\n";
|
|
|
|
echo "Testing 'r+'\n";
|
|
$fd = fopen($file, 'r+');
|
|
if ($fd) echo "opened\n\n";
|
|
|
|
echo "\n";
|
|
echo "Done.\n";
|
|
?>
|
|
--EXPECTF--
|
|
Testing 'r'
|
|
opened
|
|
|
|
Testing 'rb'
|
|
opened
|
|
|
|
Testing 'r+'
|
|
|
|
Warning: fopen(%s): %cailed to open stream: Only the "r" and "rb" open modes are permitted, given r+ in %s on line %d
|
|
|
|
Done.
|