]> granicus.if.org Git - php/commitdiff
Make some tests pass.
authorSara Golemon <pollita@php.net>
Sun, 2 Apr 2006 17:41:04 +0000 (17:41 +0000)
committerSara Golemon <pollita@php.net>
Sun, 2 Apr 2006 17:41:04 +0000 (17:41 +0000)
compression is just a binary thing.
Write unicode and suffer my wrath!

ext/bz2/tests/bz2_filter_compress.phpt
ext/bz2/tests/bz2_filter_decompress.phpt
ext/bz2/tests/with_files.phpt
ext/bz2/tests/with_strings.phpt

index 3de9a9d3ecb43703a827eec0b276c8b73b25cd71..4926e112b5b575d5f07c423ef40fd5d2cf9f8010 100644 (file)
@@ -4,7 +4,7 @@ bzip2.compress (with convert.base64-encode)
 <?php if (!extension_loaded("bz2")) print "skip"; ?>
 --FILE--
 <?php /* $Id$ */
-$text = 'I am the very model of a modern major general, I\'ve information vegetable, animal, and mineral.';
+$text = b'I am the very model of a modern major general, I\'ve information vegetable, animal, and mineral.';
 
 $fp = fopen('php://stdout', 'w');
 stream_filter_append($fp, 'bzip2.compress', STREAM_FILTER_WRITE);
index 951d572cb2d8ff409d1bd1f4d25c6a9b1300394c..3d354125a0b8486e083a9e81629bb74c9581c6e9 100644 (file)
@@ -4,7 +4,7 @@ bzip2.decompress (with convert.base64-decode)
 <?php if (!extension_loaded("bz2")) print "skip"; ?>
 --FILE--
 <?php /* $Id$ */
-$text = 'QlpoNDFBWSZTWRN6QG0AAAoVgECFACA395UgIABIintI1N6mpowIQ0E1MTTAQGYTNcRyMZm5kgW3ib7hVboE7Tmqj3ToGZ5G3q1ZauD2G58hibSck8KS95EEAbx1Cn+LuSKcKEgJvSA2gA==';
+$text = b'QlpoNDFBWSZTWRN6QG0AAAoVgECFACA395UgIABIintI1N6mpowIQ0E1MTTAQGYTNcRyMZm5kgW3ib7hVboE7Tmqj3ToGZ5G3q1ZauD2G58hibSck8KS95EEAbx1Cn+LuSKcKEgJvSA2gA==';
 
 $fp = fopen('php://stdout', 'w');
 stream_filter_append($fp, 'convert.base64-decode', STREAM_FILTER_WRITE);
index 569144593928eb7bd943554d43c16a89dd8098e4..c9f56f94f94e3cab65177be1b219e7f33135fa0a 100644 (file)
@@ -8,7 +8,7 @@ BZ2 with files
 error_reporting(E_ALL);
 
 $filename = "testfile.bz2";
-$str = "This is a test string.\n";
+$str = b"This is a test string.\n";
 $bz = bzopen($filename, "w");
 bzwrite($bz, $str);
 bzclose($bz);
index adf07e16f9f582dcc34db4dd6da004650a6808aa..49c084f11838409e4c6a5969b025f56de1f1021a 100644 (file)
@@ -8,7 +8,7 @@ BZ2 with strings
 error_reporting(E_ALL);
 
 # This FAILS
-$blaat = <<<HEREDOC
+$blaat = b<<<HEREDOC
 This is some random data
 HEREDOC;