From: Jani Taskinen Date: Tue, 8 Apr 2008 08:45:04 +0000 (+0000) Subject: MF53: Fix tests X-Git-Tag: php-5.2.6RC5~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f7df8099a3dda0d356c5c65513bf9f71f8c701a;p=php MF53: Fix tests --- diff --git a/ext/zlib/tests/bug_40189.phpt b/ext/zlib/tests/bug_40189.phpt index 5ae51bf4ba..07e5191a9c 100644 --- a/ext/zlib/tests/bug_40189.phpt +++ b/ext/zlib/tests/bug_40189.phpt @@ -7,13 +7,17 @@ Bug #40189 (endless loop in zlib.inflate stream filter) // this string is an excerpt of a phar archive that caused an infinite loop $a = "\x3\x0\x85\x46\x2f\x7c\xc2\xaa\x69\x2b\x6d\xe5\xdb\xfe\xe4\x21\x8f\x0\x97\x21\x1d\x2\x0\x0\x0\x47\x42\x4d\x42"; var_dump(base64_encode($a)); -$gp = fopen('test.other', 'wb'); +$gp = fopen(dirname(__FILE__) . '/test.other', 'wb'); $fp = fopen('data://text/plain;base64,AwCFRi98wqppK23l2/7kIY8AlyEdAgAAAEdCTUI=', 'r'); stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ); var_dump(stream_copy_to_stream($fp, $gp, 5)); fclose($fp); fclose($gp); -var_dump(file_get_contents('test.other')); +var_dump(file_get_contents(dirname(__FILE__) . '/test.other')); +?> +--CLEAN-- + --EXPECT-- string(40) "AwCFRi98wqppK23l2/7kIY8AlyEdAgAAAEdCTUI=" diff --git a/ext/zlib/tests/bug_40189_2.phpt b/ext/zlib/tests/bug_40189_2.phpt index d89ffea8bc..13a19dbd95 100644 --- a/ext/zlib/tests/bug_40189_2.phpt +++ b/ext/zlib/tests/bug_40189_2.phpt @@ -4,7 +4,7 @@ Bug #40189 (test for truncated deflate, also part of erroneous fix for #40189) --FILE-- 15+16)); $b = fread($a, 4716032); var_dump(strlen($b));