From: Antony Dovgal Date: Tue, 8 Aug 2006 20:24:13 +0000 (+0000) Subject: fix tests X-Git-Tag: RELEASE_1_0_0RC1~2025 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b2273b90500d48e43cdaf0f3fd2494684f881a8;p=php fix tests --- diff --git a/ext/standard/tests/filters/bug22538.phpt b/ext/standard/tests/filters/bug22538.phpt index 438b5be31f..4297d705c7 100644 --- a/ext/standard/tests/filters/bug22538.phpt +++ b/ext/standard/tests/filters/bug22538.phpt @@ -15,12 +15,12 @@ do { $path2 = sprintf("%s/%s%db", dirname(__FILE__), uniqid(), time()); } while ($path1 == $path2); -$fp = fopen($path1, "w") or die("Can not open $path1\n"); +$fp = fopen($path1, "wb") or die("Can not open $path1\n"); $str = "abcdefghijklmnopqrstuvwxyz\n"; $str_len = strlen($str); $cnt = $size; while (($cnt -= $str_len) > 0) { - fwrite($fp, $str); + fwrite($fp, (binary)$str); } $cnt = $size - ($str_len + $cnt); fclose($fp); @@ -42,3 +42,8 @@ int(65529) int(65529) string(32) "e10e3d1ae81b084b822e8592d019b57a" string(32) "931f0fbf8a72312e3bab9965b1d1081c" +--UEXPECT-- +int(65529) +int(65529) +unicode(32) "e10e3d1ae81b084b822e8592d019b57a" +unicode(32) "931f0fbf8a72312e3bab9965b1d1081c"