mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
make test more flexible to match different compressed strings
particurarly needed with zlib 1.2.11
This commit is contained in:
parent
5096a429a1
commit
f258e9b803
7 changed files with 15 additions and 10 deletions
|
@ -41,11 +41,11 @@ bool(false)
|
|||
|
||||
Warning: gzencode(): encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE in %s on line %d
|
||||
bool(false)
|
||||
string(%d) "%s"
|
||||
string(%d) "%s"
|
||||
string(%d) "%a"
|
||||
string(%d) "%a"
|
||||
|
||||
Warning: gzencode(): encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE in %s on line %d
|
||||
bool(false)
|
||||
string(%d) "%s"
|
||||
string(%d) "%s"
|
||||
string(%d) "%a"
|
||||
string(%d) "%a"
|
||||
Done
|
||||
|
|
|
@ -14,7 +14,7 @@ header('Vary: Cookie');
|
|||
echo 'foo';
|
||||
?>
|
||||
--EXPECTF--
|
||||
%s
|
||||
%a
|
||||
--EXPECTHEADERS--
|
||||
Vary: Cookie
|
||||
Content-Encoding: gzip
|
||||
|
|
Binary file not shown.
|
@ -10,6 +10,11 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) {
|
|||
if (!extension_loaded("zlib")) {
|
||||
print "skip - ZLIB extension not loaded";
|
||||
}
|
||||
|
||||
include 'func.inc';
|
||||
if (version_compare(get_zlib_version(), "1.2.11") < 0) {
|
||||
die("skip - at least zlib 1.2.11 required, got " . get_zlib_version());
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
@ -34,7 +39,7 @@ var_dump(bin2hex(gzencode($data, -1, FORCE_DEFLATE)));
|
|||
*** Testing gzencode() : variation ***
|
||||
|
||||
-- Testing with each encoding_mode --
|
||||
string(90) "1f8b080000000000000b735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de519000000"
|
||||
string(90) "1f8b080000000000000b735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de519000000"
|
||||
string(90) "1f8b080000000000000a735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de519000000"
|
||||
string(90) "1f8b080000000000000a735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de519000000"
|
||||
string(66) "789c735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200735808cd"
|
||||
===DONE===
|
||||
|
|
|
@ -16,5 +16,5 @@ HTTP_ACCEPT_ENCODING=gzip
|
|||
echo "hi\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<EFBFBD>%s
|
||||
‹%a
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ ini_set("zlib.output_compression", 1);
|
|||
echo "hi\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<EFBFBD>%s
|
||||
‹%a
|
||||
--EXPECTHEADERS--
|
||||
Content-Encoding: gzip
|
||||
Vary: Accept-Encoding
|
||||
|
|
|
@ -17,7 +17,7 @@ ob_start("ob_gzhandler");
|
|||
echo "hi\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
<EFBFBD>%s
|
||||
‹%a
|
||||
--EXPECTHEADERS--
|
||||
Content-Encoding: gzip
|
||||
Vary: Accept-Encoding
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue