]> granicus.if.org Git - php/commitdiff
Fix tests
authorArnaud Le Blanc <lbarnaud@php.net>
Fri, 24 Apr 2009 15:52:38 +0000 (15:52 +0000)
committerArnaud Le Blanc <lbarnaud@php.net>
Fri, 24 Apr 2009 15:52:38 +0000 (15:52 +0000)
Zend/tests/unicode_001.phpt
ext/pcre/tests/bug42298.phpt
ext/pcre/tests/bug47229.phpt

index a4bd1186e4cb41998dbc454ddd6d5a1d2a35bfd6..548fc3b000500ec325142fff0831a878a76f7b90 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Comparing size of binary and unicode strings
+--INI--
+unicode.runtime_encoding=utf-8
 --FILE--
 <?php 
 
index b6f0c303584cb7c22274c511a05f24964391d03d..ea453b25ce1fc5015e0189ca6a1b4a0e5c524fac 100644 (file)
@@ -1,12 +1,15 @@
 --TEST--
 Bug #42298 (pcre gives bogus results with /u)
+--INI--
+unicode.runtime_encoding=utf-8
+unicode.output_encoding=utf-8
 --FILE--
 <?php
-$str = "A\xc2\xa3BC";
+$str = b"A\xc2\xa3BC";
 preg_match_all('/\S\S/u', $str, $m);   var_dump($m);
 preg_match_all('/\S{2}/u', $str, $m);  var_dump($m);
 
-$str = "A\xe2\x82\xac ";
+$str = b"A\xe2\x82\xac ";
 preg_match_all('/\W\W/u', $str, $m);   var_dump($m);
 preg_match_all('/\W{2}/u', $str, $m);  var_dump($m);
 
@@ -16,7 +19,7 @@ array(1) {
   [0]=>
   array(2) {
     [0]=>
-    unicode(3) "A£"
+    unicode(2) "A£"
     [1]=>
     unicode(2) "BC"
   }
@@ -25,7 +28,7 @@ array(1) {
   [0]=>
   array(2) {
     [0]=>
-    unicode(3) "A£"
+    unicode(2) "A£"
     [1]=>
     unicode(2) "BC"
   }
@@ -34,13 +37,13 @@ array(1) {
   [0]=>
   array(1) {
     [0]=>
-    unicode(4) "€ "
+    unicode(2) "€ "
   }
 }
 array(1) {
   [0]=>
   array(1) {
     [0]=>
-    unicode(4) "€ "
+    unicode(2) "€ "
   }
 }
index 74dcf20099d6b8d0a94317a90f55f3905b26ab15..96b95a255df4470db5179b72d4e3b22f688abfc3 100644 (file)
@@ -19,19 +19,19 @@ preg_match("/a\-{1,}/", 'a\----a', $m);
 var_dump($m);
 
 ?>
---EXPECT--
-string(13) "\-oh really\?"
+--EXPECTF--
+%string|unicode%(13) "\-oh really\?"
 array(1) {
   [0]=>
-  string(4) "a---"
+  %string|unicode%(4) "a---"
 }
 array(1) {
   [0]=>
-  string(1) "a"
+  %string|unicode%(1) "a"
 }
 array(1) {
   [0]=>
-  string(5) "a----"
+  %string|unicode%(5) "a----"
 }
 array(0) {
 }