xref: /php-src/ext/bz2/tests/005.phpt (revision d4c88a29)
1--TEST--
2bzcompress()/bzdecompress() tests
3--EXTENSIONS--
4bz2
5--FILE--
6<?php
7
8$string = "Life it seems, will fade away
9Drifting further everyday
10Getting lost within myself
11Nothing matters no one else";
12
13var_dump(bzcompress(1,1,1));
14
15$data = bzcompress($string);
16$data2 = bzcompress($string, 1, 10);
17
18$data3 = $data2;
19$data3[3] = 0;
20
21var_dump(bzdecompress(1,1));
22var_dump(bzdecompress($data3));
23var_dump(bzdecompress($data3,1));
24
25var_dump(bzdecompress($data, 0));
26var_dump(bzdecompress($data, 1));
27var_dump(bzdecompress($data));
28var_dump(bzdecompress($data2));
29
30echo "Done\n";
31?>
32--EXPECTF--
33string(%d) "BZ%a"
34int(-5)
35int(-5)
36int(-5)
37string(110) "Life it seems, will fade away
38Drifting further everyday
39Getting lost within myself
40Nothing matters no one else"
41string(110) "Life it seems, will fade away
42Drifting further everyday
43Getting lost within myself
44Nothing matters no one else"
45string(110) "Life it seems, will fade away
46Drifting further everyday
47Getting lost within myself
48Nothing matters no one else"
49string(110) "Life it seems, will fade away
50Drifting further everyday
51Getting lost within myself
52Nothing matters no one else"
53Done
54