mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 21:34:53 +08:00
tests for brotli and xz
This commit is contained in:
parent
a9d37bb2a2
commit
e2191113b0
8
src/globals/ext-tests/brotli.php
Normal file
8
src/globals/ext-tests/brotli.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
$str = 'brotli_compress ( string $data, int $level = BROTLI_COMPRESS_LEVEL_DEFAULT, int $mode = BROTLI_GENERIC, string|null $dict = null ): string|false';
|
||||
assert(function_exists('brotli_compress'));
|
||||
assert(function_exists('brotli_uncompress '));
|
||||
assert(brotli_uncompress(brotli_compress($str)) === $str);
|
||||
8
src/globals/ext-tests/xz.php
Normal file
8
src/globals/ext-tests/xz.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
$str = 'Data you would like compressed.';
|
||||
assert(function_exists('xzencode'));
|
||||
assert(function_exists('xzdecode'));
|
||||
assert(xzdecode(xzencode($str)) === $str);
|
||||
Loading…
x
Reference in New Issue
Block a user