Annotation of embedaddon/php/ext/zlib/tests/gzfilegzreadfile.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: gzfile(), gzreadfile()
3: --SKIPIF--
4: <?php /* $Id: gzfilegzreadfile.phpt 316410 2011-09-08 10:20:38Z pajoye $ */
5: if (!extension_loaded("zlib")) print "skip"; ?>
6: --FILE--
7: <?php
8: $original = <<<EOD
9: blah blah blah blah blah blah blah
10: blah blah blah blah blah blah blah
11: blah blah blah blah blah blah blah
12: blah blah blah blah blah blah blah
13: blah blah blah blah blah blah blah
14: blah blah blah blah blah blah blah
15: blah blah blah blah blah blah blah
16: blah blah blah blah blah blah blah
17: blah blah blah blah blah blah blah
18: blah blah blah blah blah blah blah
19: blah blah blah blah blah blah blah
20: blah blah blah blah blah blah blah
21: blah blah blah blah blah blah blah
22: blah blah blah blah blah blah blah
23: blah blah blah blah blah blah blah
24: blah blah blah blah blah blah blah
25:
26: EOD;
27:
28: $filename = tempnam("/tmp", "phpt");
29:
30: $fp = gzopen($filename, "wb");
31: gzwrite($fp, $original);
32: var_dump(strlen($original));
33: fclose($fp);
34:
35: readgzfile($filename);
36:
37: echo "\n";
38:
39: $lines = gzfile($filename);
40:
41: unlink($filename);
42:
43: foreach ($lines as $line) {
44: echo $line;
45: }
46:
47: ?>
48: --EXPECT--
49: int(560)
50: blah blah blah blah blah blah blah
51: blah blah blah blah blah blah blah
52: blah blah blah blah blah blah blah
53: blah blah blah blah blah blah blah
54: blah blah blah blah blah blah blah
55: blah blah blah blah blah blah blah
56: blah blah blah blah blah blah blah
57: blah blah blah blah blah blah blah
58: blah blah blah blah blah blah blah
59: blah blah blah blah blah blah blah
60: blah blah blah blah blah blah blah
61: blah blah blah blah blah blah blah
62: blah blah blah blah blah blah blah
63: blah blah blah blah blah blah blah
64: blah blah blah blah blah blah blah
65: blah blah blah blah blah blah blah
66:
67: blah blah blah blah blah blah blah
68: blah blah blah blah blah blah blah
69: blah blah blah blah blah blah blah
70: blah blah blah blah blah blah blah
71: blah blah blah blah blah blah blah
72: blah blah blah blah blah blah blah
73: blah blah blah blah blah blah blah
74: blah blah blah blah blah blah blah
75: blah blah blah blah blah blah blah
76: blah blah blah blah blah blah blah
77: blah blah blah blah blah blah blah
78: blah blah blah blah blah blah blah
79: blah blah blah blah blah blah blah
80: blah blah blah blah blah blah blah
81: blah blah blah blah blah blah blah
82: blah blah blah blah blah blah blah
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>