diff options
Diffstat (limited to 'ext/zlib/tests/gzread_variation1.phpt')
-rw-r--r-- | ext/zlib/tests/gzread_variation1.phpt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/zlib/tests/gzread_variation1.phpt b/ext/zlib/tests/gzread_variation1.phpt new file mode 100644 index 0000000000..1f50d77126 --- /dev/null +++ b/ext/zlib/tests/gzread_variation1.phpt @@ -0,0 +1,34 @@ +--TEST-- +Test function gzread() by calling it while file open for writing +--SKIPIF-- +<?php +if (!extension_loaded("zlib")) { + print "skip - ZLIB extension not loaded"; +} +?> +--FILE-- +<?php + +$filename = "temp.txt.gz"; +$h = gzopen($filename, 'w'); +$str = "Here is the string to be written. "; +var_dump(gzread($h, 100)); +gzwrite( $h, $str); +var_dump(gzread($h, 100)); +gzrewind($h); +var_dump(gzread($h, 100)); +gzclose($h); + +$h = gzopen($filename, 'r'); +gzpassthru($h); +gzclose($h); +echo "\n"; +unlink($filename); +?> +===DONE=== +--EXPECT-- +string(0) "" +string(0) "" +string(0) "" +Here is the string to be written. +===DONE===
\ No newline at end of file |