PATH:
opt
/
alt
/
tests
/
alt-php82-pecl-brotli_0.18.3-2.el8
/
tests
--TEST-- Test roundtrip --SKIPIF-- <?php if (!extension_loaded('brotli')) { die('skip'); } include dirname(__FILE__) . '/files.inc'; if (roundtrip_files() === false) { die('skip'); } ?> --FILE-- <?php include dirname(__FILE__) . '/files.inc'; $files = roundtrip_files(); $qualities = array(BROTLI_COMPRESS_LEVEL_MIN, 6, 9, BROTLI_COMPRESS_LEVEL_MAX); foreach ($files as $filename) { foreach ($qualities as $level) { echo 'Roundtrip testing file ', basename($filename), ' at level ', $level, PHP_EOL; $expected = $filename; if (file_exists($expected)) { $data = file_get_contents($expected); $expected_data = brotli_uncompress(brotli_compress($data, $level)); if ($data !== $expected_data) { echo " NG\n"; exit(1); } else { echo " OK\n"; } } } } --EXPECTF-- Roundtrip testing file alice29.txt at level 0 OK Roundtrip testing file alice29.txt at level 6 OK Roundtrip testing file alice29.txt at level 9 OK Roundtrip testing file alice29.txt at level 11 OK Roundtrip testing file asyoulik.txt at level 0 OK Roundtrip testing file asyoulik.txt at level 6 OK Roundtrip testing file asyoulik.txt at level 9 OK Roundtrip testing file asyoulik.txt at level 11 OK Roundtrip testing file lcet10.txt at level 0 OK Roundtrip testing file lcet10.txt at level 6 OK Roundtrip testing file lcet10.txt at level 9 OK Roundtrip testing file lcet10.txt at level 11 OK Roundtrip testing file plrabn12.txt at level 0 OK Roundtrip testing file plrabn12.txt at level 6 OK Roundtrip testing file plrabn12.txt at level 9 OK Roundtrip testing file plrabn12.txt at level 11 OK Roundtrip testing file encode.c at level 0 OK Roundtrip testing file encode.c at level 6 OK Roundtrip testing file encode.c at level 9 OK Roundtrip testing file encode.c at level 11 OK Roundtrip testing file dictionary.h at level 0 OK Roundtrip testing file dictionary.h at level 6 OK Roundtrip testing file dictionary.h at level 9 OK Roundtrip testing file dictionary.h at level 11 OK Roundtrip testing file decode.c at level 0 OK Roundtrip testing file decode.c at level 6 OK Roundtrip testing file decode.c at level 9 OK Roundtrip testing file decode.c at level 11 OK
[-] ob_008.phpt
[edit]
[-] ob_dcb_001.phpt
[edit]
[-] ob_005.phpt
[edit]
[-] dictionary_streams.phpt
[edit]
[-] info.phpt
[edit]
[-] ob_009.phpt
[edit]
[-] data.inc
[edit]
[-] ob_002.phpt
[edit]
[-] streams_002.phpt
[edit]
[-] incremental_compress_add_basic.phpt
[edit]
[+]
files
[-] ob_dcb_005.phpt
[edit]
[-] alias.phpt
[edit]
[-] ob_007.phpt
[edit]
[-] named_args_incremental.phpt
[edit]
[-] compatibility.phpt
[edit]
[-] incremental_uncompress_add_basic.phpt
[edit]
[-] dictionary_ob.phpt
[edit]
[-] ob_003.phpt
[edit]
[-] ob_010.phpt
[edit]
[-] files.inc
[edit]
[+]
..
[-] dictionary_named_args.phpt
[edit]
[-] incremental_uncompress_add_alias.phpt
[edit]
[-] streams_006.phpt
[edit]
[-] streams_005.phpt
[edit]
[-] compress_add.phpt
[edit]
[-] ob_dcb_004.phpt
[edit]
[-] ob_004.phpt
[edit]
[-] dictionary_named_args_incremental.phpt
[edit]
[-] roundtrip.phpt
[edit]
[-] data.dict
[edit]
[-] compress_args.phpt
[edit]
[-] dictionary_args.phpt
[edit]
[-] ob_dcb_003.phpt
[edit]
[-] ob_006.phpt
[edit]
[-] streams_001.phpt
[edit]
[-] named_args.phpt
[edit]
[-] dictionary_incremental.phpt
[edit]
[-] ob_dcb_002.phpt
[edit]
[-] ob_011.phpt
[edit]
[-] dictionary_basic.phpt
[edit]
[-] streams_003.phpt
[edit]
[-] apcu_serializer.phpt
[edit]
[-] incremental_compress_add_alias.phpt
[edit]
[-] incremental_compress_add_args.phpt
[edit]
[-] streams_004.phpt
[edit]
[-] ob_001.phpt
[edit]