1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/zlib/tests/gzinflate_error1.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

26 lines
550 B
PHP

--TEST--
Test gzinflate() function : error conditions
--EXTENSIONS--
zlib
--FILE--
<?php
include(__DIR__ . '/data/data.inc');
echo "*** Testing gzinflate() : error conditions ***\n";
echo "\n-- Testing with a buffer that is too small --\n";
$data = 'string_val';
$short_len = strlen($data) - 1;
$compressed = gzcompress($data);
var_dump(gzinflate($compressed, $short_len));
?>
--EXPECTF--
*** Testing gzinflate() : error conditions ***
-- Testing with a buffer that is too small --
Warning: gzinflate(): data error in %s on line %d
bool(false)