diff options
Diffstat (limited to 'ext/zlib/tests/gzwrite_variation1.phpt')
-rw-r--r-- | ext/zlib/tests/gzwrite_variation1.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/zlib/tests/gzwrite_variation1.phpt b/ext/zlib/tests/gzwrite_variation1.phpt new file mode 100644 index 0000000..ab6c260 --- /dev/null +++ b/ext/zlib/tests/gzwrite_variation1.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test function gzwrite() by calling it when file is opened for reading +--SKIPIF-- +<?php +if (!extension_loaded("zlib")) { + print "skip - ZLIB extension not loaded"; +} +?> +--FILE-- +<?php + +$filename = dirname(__FILE__)."/004.txt.gz"; +$h = gzopen($filename, 'r'); +$str = b"Here is the string to be written. "; +$length = 10; +var_dump(gzwrite( $h, $str ) ); +var_dump(gzread($h, 10)); +var_dump(gzwrite( $h, $str, $length ) ); +gzclose($h); + +?> +===DONE=== +--EXPECT-- +int(0) +string(10) "When you'r" +int(0) +===DONE===
\ No newline at end of file |