2003-05-17 14:27:07 +00:00
|
|
|
--TEST--
|
|
|
|
BZ2 with strings
|
|
|
|
--SKIPIF--
|
|
|
|
<?php if (!extension_loaded("bz2")) print "skip"; ?>
|
|
|
|
--FILE--
|
|
|
|
<?php // $Id$
|
|
|
|
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
|
|
# This FAILS
|
2006-04-02 17:41:04 +00:00
|
|
|
$blaat = b<<<HEREDOC
|
2003-05-17 14:27:07 +00:00
|
|
|
This is some random data
|
|
|
|
HEREDOC;
|
|
|
|
|
|
|
|
# This Works: (so, is heredoc related)
|
|
|
|
#$blaat= 'This is some random data';
|
|
|
|
|
|
|
|
$blaat2 = bzdecompress(bzcompress($blaat));
|
|
|
|
|
|
|
|
$tests = <<<TESTS
|
|
|
|
\$blaat === \$blaat2
|
|
|
|
TESTS;
|
|
|
|
|
2003-08-18 22:57:49 +00:00
|
|
|
include(dirname(__FILE__) . '/../../../tests/quicktester.inc');
|
2003-05-17 14:27:07 +00:00
|
|
|
|
|
|
|
--EXPECT--
|
|
|
|
OK
|