1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 03:32:20 +02:00
Files
archived-php-src/ext/zlib/tests/bug73944.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

20 lines
623 B
PHP

--TEST--
Bug #73944: Dictionary option of intflate_init() does not work
--SKIPIF--
<?php if(!extension_loaded('zlib')) die('skip zlib extension not loaded'); ?>
--FILE--
<?php
$in = inflate_init(ZLIB_ENCODING_RAW, array('dictionary' => str_repeat("\00", 32768)));
$a = inflate_add($in, file_get_contents(__DIR__.'/bug73944_fixture1'));
echo '1 block: '.strlen($a).PHP_EOL;
$in = inflate_init(ZLIB_ENCODING_RAW, array('dictionary' => $a));
$b = inflate_add($in, file_get_contents(__DIR__.'/bug73944_fixture2'));
echo '2 block: '.($b === false ? 'failed' : strlen($b)).PHP_EOL;
?>
--EXPECT--
1 block: 32768
2 block: 32768