summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/dictionary_usage.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zlib/tests/dictionary_usage.phpt')
-rw-r--r--ext/zlib/tests/dictionary_usage.phpt5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/zlib/tests/dictionary_usage.phpt b/ext/zlib/tests/dictionary_usage.phpt
index 8ffa9e8bcd..f7ef3b3a9c 100644
--- a/ext/zlib/tests/dictionary_usage.phpt
+++ b/ext/zlib/tests/dictionary_usage.phpt
@@ -9,6 +9,10 @@ $r = deflate_init(ZLIB_ENCODING_DEFLATE, ["dictionary" => $dict]);
$a = deflate_add($r, "abdcde", ZLIB_FINISH);
var_dump($a);
+$r = deflate_init(ZLIB_ENCODING_DEFLATE, ["dictionary" => implode("\0", $dict)."\0"]);
+$dictStr_a = deflate_add($r, "abdcde", ZLIB_FINISH);
+var_dump($dictStr_a === $a);
+
$r = inflate_init(ZLIB_ENCODING_DEFLATE, ["dictionary" => $dict]);
var_dump(inflate_add($r, $a, ZLIB_FINISH));
@@ -19,6 +23,7 @@ var_dump(inflate_add($r, $a, ZLIB_FINISH));
?>
--EXPECTF--
string(%d) "%s"
+bool(true)
string(6) "abdcde"
Warning: inflate_add(): dictionary does not match expected dictionary (incorrect adler32 hash) in %s on line %d