From 6b2273b90500d48e43cdaf0f3fd2494684f881a8 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 8 Aug 2006 20:24:13 +0000 Subject: [PATCH] fix tests --- ext/standard/tests/filters/bug22538.phpt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ext/standard/tests/filters/bug22538.phpt b/ext/standard/tests/filters/bug22538.phpt index 438b5be31f8..4297d705c71 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"