1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/zlib/tests/gzuncompress_basic1.phpt
Nikita Popov c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00

36 lines
772 B
PHP

--TEST--
Test gzuncompress() function : basic functionality
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php
include(__DIR__ . '/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