1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/zlib/tests/gzuncompress_basic1.phpt
Gina Peter Banyard 5bd18e3fdc ext/zlib: Refactor tests (#18887)
- Use INI sections
- Use CGI sections
- Move data into a subfolder
- Remove ZPP tests
- Fix various bugs within tests
- Simplify some


Found while working on #18879
2025-06-21 18:03:50 +01:00

32 lines
696 B
PHP

--TEST--
Test gzuncompress() function : basic functionality
--EXTENSIONS--
zlib
--FILE--
<?php
include(__DIR__ . '/data/data.inc');
echo "*** Testing gzuncompress() : basic functionality ***\n";
// Initialise all required variables
$compressed = gzcompress($data);
echo "\n-- Basic decompress --\n";
var_dump(strcmp($data, gzuncompress($compressed)));
$length = 3547;
echo "\n-- Calling gzuncompress() with max length of $length --\n";
echo "Result length is ". strlen(gzuncompress($compressed, $length)) . "\n";
?>
--EXPECT--
*** Testing gzuncompress() : basic functionality ***
-- Basic decompress --
int(0)
-- Calling gzuncompress() with max length of 3547 --
Result length is 3547