]> granicus.if.org Git - php/commitdiff
fix tests
authorAntony Dovgal <tony2001@php.net>
Tue, 8 Aug 2006 20:24:13 +0000 (20:24 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 8 Aug 2006 20:24:13 +0000 (20:24 +0000)
ext/standard/tests/filters/bug22538.phpt

index 438b5be31f8dc175f4b0d71fe407da6fe4505ee4..4297d705c712d7fd356549baf319f1d246899af2 100644 (file)
@@ -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"