From: Michael Wallner Date: Mon, 10 Oct 2005 19:51:38 +0000 (+0000) Subject: - fix test if ext/zlib is not loaded X-Git-Tag: RELEASE_0_15_0~10 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=409bb0b714a9518863b428f7abe6fc5680f915fa;p=m6w6%2Fext-http - fix test if ext/zlib is not loaded --- diff --git a/tests/encodings.phpt b/tests/encodings.phpt index e66eabd..f14867f 100644 --- a/tests/encodings.phpt +++ b/tests/encodings.phpt @@ -25,19 +25,19 @@ var_dump($s == http_gzdecode(http_gzencode($s))); var_dump($s == http_inflate(http_deflate($s))); var_dump($s == http_uncompress(http_compress($s))); - -$s = "A simple test string, which won't blow up ext/zlib.\n"; - -var_dump($s == http_gzdecode(gzencode($s))); -var_dump($s == http_inflate(gzdeflate($s))); -var_dump($s == http_uncompress(gzcompress($s))); - -/* no gzdecode in ext/zlib -var_dump($s == gzdecode(http_gzencode($s))); */ -var_dump($s == gzinflate(http_deflate($s))); -var_dump($s == gzuncompress(http_compress($s))); - if (extension_loaded('zlib')) { + + $s = "A simple test string, which won't blow up ext/zlib.\n"; + + ($s == http_gzdecode(gzencode($s))) or print "GZIP Failed\n"; + ($s == http_inflate(gzdeflate($s))) or print "DEFLATE Failed\n"; + ($s == http_uncompress(gzcompress($s))) or print "COMPRESS Failed\n"; + + /* no gzdecode in ext/zlib + ($s == gzdecode(http_gzencode($s))) or print "GZIP Failed\n"; */ + ($s == gzinflate(http_deflate($s))) or print "DEFLATE Failed\n"; + ($s == gzuncompress(http_compress($s))) or print "COMPRESS Failed\n"; + (gzencode($s) == http_gzencode($s)) or print "GZIP Failed\n"; (gzdeflate($s) == http_deflate($s)) or print "DEFLATE Failed\n"; (gzcompress($s) == http_compress($s)) or print "COMPRESS Failed\n"; @@ -50,9 +50,4 @@ echo "Done\n"; bool(true) bool(true) bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) Done