summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/readgzfile_basic2.phpt
diff options
context:
space:
mode:
authorDave Kelsey <dkelsey@php.net>2009-01-19 14:03:19 +0000
committerDave Kelsey <dkelsey@php.net>2009-01-19 14:03:19 +0000
commitfc4a0d3886c6e47472142be9740a745cc1c2046d (patch)
tree7c56b34ac4dbc99e9cd195bbf22ee0f5619a9ecf /ext/zlib/tests/readgzfile_basic2.phpt
parent9ea96c467a09c9439c434d087e5127489dd28388 (diff)
downloadphp-git-fc4a0d3886c6e47472142be9740a745cc1c2046d.tar.gz
new tests for zlib extension, tested on windows, linux and linux64
Diffstat (limited to 'ext/zlib/tests/readgzfile_basic2.phpt')
-rw-r--r--ext/zlib/tests/readgzfile_basic2.phpt34
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/zlib/tests/readgzfile_basic2.phpt b/ext/zlib/tests/readgzfile_basic2.phpt
new file mode 100644
index 0000000000..99d216a55e
--- /dev/null
+++ b/ext/zlib/tests/readgzfile_basic2.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test function readgzfile() reading a plain relative file
+--SKIPIF--
+<?php
+if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
+?>
+--FILE--
+<?php
+$plaintxt = b<<<EOT
+hello world
+is a very common test
+for all languages
+
+EOT;
+$dirname = 'readgzfile_temp';
+$filename = $dirname.'/plainfile.txt';
+mkdir($dirname);
+$h = fopen($filename, 'w');
+fwrite($h, $plaintxt);
+fclose($h);
+
+
+var_dump(readgzfile( $filename ) );
+
+unlink($filename);
+rmdir($dirname);
+?>
+===DONE===
+--EXPECT--
+hello world
+is a very common test
+for all languages
+int(52)
+===DONE===