xref: /PHP-5.4/ext/bz2/tests/003.phpt (revision 3d63ca3e)
1--TEST--
2bzread() tests
3--SKIPIF--
4<?php if (!extension_loaded("bz2")) print "skip"; ?>
5--FILE--
6<?php
7
8$fd = bzopen(dirname(__FILE__)."/003.txt.bz2","r");
9var_dump(bzread());
10var_dump(bzread($fd, 1 ,0));
11var_dump(bzread($fd, 0));
12var_dump(bzread($fd, -10));
13var_dump(bzread($fd, 1));
14var_dump(bzread($fd, 2));
15var_dump(bzread($fd, 100000));
16
17echo "Done\n";
18?>
19--EXPECTF--
20Warning: bzread() expects at least 1 parameter, 0 given in %s on line %d
21bool(false)
22
23Warning: bzread() expects at most 2 parameters, 3 given in %s on line %d
24bool(false)
25string(0) ""
26
27Warning: bzread(): length may not be negative in %s on line %d
28bool(false)
29string(1) "R"
30string(2) "is"
31string(251) "ing up from the heart of the desert
32Rising up for Jerusalem
33Rising up from the heat of the desert
34Building up Old Jerusalem
35Rising up from the heart of the desert
36Rising up for Jerusalem
37Rising up from the heat of the desert
38Heading out for Jerusalem
39"
40Done
41