mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
add lz4 test
This commit is contained in:
parent
67320d3eb3
commit
2f25409475
15
src/globals/ext-tests/lz4.php
Normal file
15
src/globals/ext-tests/lz4.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
assert(function_exists('lz4_compress'));
|
||||
assert(function_exists('lz4_uncompress'));
|
||||
|
||||
$input = str_repeat('The quick brown fox jumps over the lazy dog. ', 10);
|
||||
$compressed = lz4_compress($input);
|
||||
assert(is_string($compressed));
|
||||
assert(strlen($compressed) < strlen($input));
|
||||
|
||||
$uncompressed = lz4_uncompress($compressed);
|
||||
assert(is_string($uncompressed));
|
||||
assert($uncompressed === $input);
|
||||
Loading…
x
Reference in New Issue
Block a user