]> granicus.if.org Git - php/commitdiff
fix tests
authorAntony Dovgal <tony2001@php.net>
Tue, 19 Sep 2006 11:49:21 +0000 (11:49 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 19 Sep 2006 11:49:21 +0000 (11:49 +0000)
ext/iconv/tests/iconv_substr.phpt
ext/pcre/tests/bug20528.phpt
ext/pcre/tests/pcre_count.phpt
ext/pcre/tests/preg_replace.phpt
ext/pcre/tests/preg_replace2.phpt
ext/pcre/tests/preg_replace_callback2.phpt
ext/pcre/tests/preg_replace_callback3.phpt
ext/pcre/tests/split.phpt
ext/pcre/tests/split2.phpt

index 1a6bd3053445df41f07785d741fdc9b5f936af79..f4e7ff47bf6f6741786eef02a82124e07414b9f5 100644 (file)
@@ -59,3 +59,21 @@ string(0) ""
 string(0) ""
 string(0) ""
 string(10) "¤Á¤Ï ISO-2"
+--UEXPECT--
+666768696a6b6c
+666768696a6b6c
+a6a4a8a4aaa4ab
+a4aba4ada4afa4b1a4b3a4b5a4b7
+bool(false)
+string(0) ""
+unicode(14) "This is a test"
+string(14) "This is a test"
+unicode(3) "est"
+string(3) "est"
+unicode(5) "This "
+string(5) "This "
+unicode(0) ""
+string(0) ""
+unicode(0) ""
+string(0) ""
+string(10) "¤Á¤Ï ISO-2"
index 8182fd9bfe5a7345d657ad9e330813fe218cfe8b..87f0672fc140637fc8b52c99cbea9f24824ac34e 100644 (file)
@@ -22,3 +22,20 @@ array(7) {
   [6]=>
   string(2) "#)"
 }
+--UEXPECT--
+array(7) {
+  [0]=>
+  unicode(2) "(#"
+  [1]=>
+  unicode(2) "11"
+  [2]=>
+  unicode(1) "/"
+  [3]=>
+  unicode(2) "19"
+  [4]=>
+  unicode(1) "/"
+  [5]=>
+  unicode(4) "2002"
+  [6]=>
+  unicode(2) "#)"
+}
index 1239d48ffb5495b725c3a4c8ed1ebd2caef54a4d..68162c4a66fd2539d583c5470b6d09e2260178e4 100644 (file)
@@ -38,3 +38,12 @@ string(25) "... ... ... ... v1c0d1/|/"
 int(4)
 string(25) "... ... ... ... v1c0d1/|/"
 NULL
+--UEXPECT--
+unicode(56) "xxxx xxxx 1-a-3-4 1-2-a-4 1-2-3-a a-a-a-a xxxx xxxx-xxxx"
+int(5)
+unicode(41) "Hxxxx xxxx xxxx xxxx xxxx 42 xxxx 13 xxxx"
+int(7)
+unicode(25) "... ... ... ... v1c0d1/|/"
+int(4)
+unicode(25) "... ... ... ... v1c0d1/|/"
+NULL
index e26db8c2fdae85115f8ec1a0de0c4115b9a9fb9a..eac46c0f4b3d6f93734c1e1ccc2ab86a9e49aed3 100644 (file)
@@ -24,12 +24,12 @@ string(0) ""
 Warning: preg_replace_callback(): Modifier /e cannot be used with replacement callback in %spreg_replace.php on line 10
 NULL
 --UEXPECTF--
-string(1) "x"
-string(4) "abcd"
-string(8) "zaab2k3l"
+unicode(1) "x"
+unicode(4) "abcd"
+unicode(8) "zaab2k3l"
 
-Warning: preg_replace_callback(): Requires argument 2, '', to be a valid callback in %spreg_replace.php on line 8
+Warning: preg_replace_callback(): Requires argument 2, '', to be a valid callback in %s on line %d
 unicode(0) ""
 
-Warning: preg_replace_callback(): Modifier /e cannot be used with replacement callback in %spreg_replace.php on line 10
+Warning: preg_replace_callback(): Modifier /e cannot be used with replacement callback in %s on line %d
 NULL
index 80a94d876897daca699b4f775bc9d83ec52c7577..2c076e7ebcd86d21770aa04b59541041b0d44870 100644 (file)
@@ -40,3 +40,28 @@ array(2) {
   string(1) "$"
 }
 ==done==
+--UEXPECTF--
+Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement in an array. in %s on line %d
+bool(false)
+unicode(1) "c"
+array(3) {
+  [0]=>
+  unicode(1) "x"
+  [1]=>
+  unicode(2) "aA"
+  [2]=>
+  unicode(2) "vb"
+}
+array(2) {
+  [0]=>
+  unicode(1) "$"
+  [1]=>
+  unicode(1) "$"
+}
+array(2) {
+  [0]=>
+  unicode(3) "x$y"
+  [1]=>
+  unicode(1) "$"
+}
+==done==
index d5c528daa41c84f09b4150d7291d65febc9334f6..e5e0e79dddc353df892a311aaea2363176b110df 100644 (file)
@@ -39,19 +39,19 @@ array(1) {
 }
 string(3) "aBC"
 --UEXPECTF--
-Warning: preg_replace_callback(): Unable to call custom replacement function in %spreg_replace_callback2.php on line %d
+Warning: preg_replace_callback(): Unable to call custom replacement function in %s on line %d
 array(3) {
   [0]=>
-  string(12) "'a' 'b3' bcd"
+  unicode(12) "'a' 'b3' bcd"
   [u"v"]=>
-  string(6) "aksfjk"
+  unicode(6) "aksfjk"
   [12]=>
-  string(9) "'aa' 'bb'"
+  unicode(9) "'aa' 'bb'"
 }
 
-Notice: Array to string conversion in %spreg_replace_callback2.php on line 17
+Notice: Array to string conversion in %s on line %d
 array(1) {
   [0]=>
-  string(7) "'A'rray"
+  unicode(7) "'A'rray"
 }
-string(3) "aBC"
+unicode(3) "aBC"
index 15d125116e115df369c4620b1a4d77dd9becbe17..9e1a0c595ea94dca487f95a5e7e96e522c27c1b9 100644 (file)
@@ -18,13 +18,13 @@ var_dump(preg_replace_callback($a,$a,$a,$a,$a));
 echo "Done\n";
 ?>
 --EXPECTF--    
-Warning: Wrong parameter count for preg_replace_callback() in %s on line %d
+Warning: preg_replace_callback() expects at least 3 parameters, 0 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for preg_replace_callback() in %s on line %d
+Warning: preg_replace_callback() expects at least 3 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for preg_replace_callback() in %s on line %d
+Warning: preg_replace_callback() expects at least 3 parameters, 2 given in %s on line %d
 NULL
 
 Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
@@ -36,21 +36,20 @@ int(3)
 Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
 int(3)
 
-Warning: preg_replace_callback(): Requires argument 2, '', to be a valid callback in %s on line 1%d
-string(0) ""
+Warning: preg_replace_callback() expects parameter 4 to be long, string given in %s on line %d
+NULL
 
-Warning: preg_replace_callback(): Requires argument 2, 'Array', to be a valid callback in %s on line %d
-array(0) {
-}
+Warning: preg_replace_callback() expects parameter 4 to be long, array given in %s on line %d
+NULL
 Done
 --UEXPECTF--
-Warning: Wrong parameter count for preg_replace_callback() in %s on line %d
+Warning: preg_replace_callback() expects at least 3 parameters, 0 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for preg_replace_callback() in %s on line %d
+Warning: preg_replace_callback() expects at least 3 parameters, 1 given in %s on line %d
 NULL
 
-Warning: Wrong parameter count for preg_replace_callback() in %s on line %d
+Warning: preg_replace_callback() expects at least 3 parameters, 2 given in %s on line %d
 NULL
 
 Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
@@ -62,10 +61,9 @@ int(3)
 Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
 int(3)
 
-Warning: preg_replace_callback(): Requires argument 2, '', to be a valid callback in %s on line %d
-unicode(0) ""
+Warning: preg_replace_callback() expects parameter 4 to be long, Unicode string given in %s on line %d
+NULL
 
-Warning: preg_replace_callback(): Requires argument 2, 'Array', to be a valid callback in %s on line %d
-array(0) {
-}
+Warning: preg_replace_callback() expects parameter 4 to be long, array given in %s on line %d
+NULL
 Done
index 8ec8e655cfe24871fb4e312a91ae4a7a639757d4..a2a024fc40643a7a18634024101fb1e42c5878a2 100644 (file)
@@ -84,3 +84,71 @@ array(4) {
   [3]=>
   string(1) "u"
 }
+--UEXPECTF--
+Warning: preg_split() expects at least 2 parameters, 0 given in %s on line %d
+bool(false)
+
+Warning: preg_split(): Compilation failed: nothing to repeat at offset 0 in %s on line %d
+bool(false)
+array(3) {
+  [0]=>
+  unicode(1) "x"
+  [1]=>
+  unicode(2) "yy"
+  [2]=>
+  unicode(3) "zzz"
+}
+array(3) {
+  [0]=>
+  unicode(1) "x"
+  [1]=>
+  unicode(2) "yy"
+  [2]=>
+  unicode(3) "zzz"
+}
+array(3) {
+  [0]=>
+  unicode(1) "x"
+  [1]=>
+  unicode(2) "yy"
+  [2]=>
+  unicode(3) "zzz"
+}
+array(1) {
+  [0]=>
+  unicode(8) "x yy,zzz"
+}
+array(2) {
+  [0]=>
+  unicode(1) "x"
+  [1]=>
+  unicode(6) "yy,zzz"
+}
+array(8) {
+  [0]=>
+  unicode(0) ""
+  [1]=>
+  unicode(1) "a"
+  [2]=>
+  unicode(1) "b"
+  [3]=>
+  unicode(0) ""
+  [4]=>
+  unicode(1) "c"
+  [5]=>
+  unicode(0) ""
+  [6]=>
+  unicode(1) "u"
+  [7]=>
+  unicode(0) ""
+}
+array(4) {
+  [0]=>
+  unicode(1) "a"
+  [1]=>
+  unicode(1) "b"
+  [2]=>
+  unicode(1) "c"
+  [3]=>
+  unicode(1) "u"
+}
index 391acb951ef7f986322541ea51a13c94e1379a86..d57e20cd69954178b3c42aef1ee6ef66f25f1dd2 100644 (file)
@@ -313,3 +313,298 @@ array(1) {
   string(6) "ab2c3u"
 }
 bool(true)
+--UEXPECTF--
+array(15) {
+  [0]=>
+  unicode(0) ""
+  [1]=>
+  unicode(0) ""
+  [2]=>
+  unicode(1) "a"
+  [3]=>
+  unicode(0) ""
+  [4]=>
+  unicode(1) "b"
+  [5]=>
+  unicode(1) "2"
+  [6]=>
+  unicode(0) ""
+  [7]=>
+  unicode(0) ""
+  [8]=>
+  unicode(1) "c"
+  [9]=>
+  unicode(1) "3"
+  [10]=>
+  unicode(0) ""
+  [11]=>
+  unicode(0) ""
+  [12]=>
+  unicode(1) "u"
+  [13]=>
+  unicode(0) ""
+  [14]=>
+  unicode(0) ""
+}
+array(8) {
+  [0]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(0)
+  }
+  [1]=>
+  array(2) {
+    [0]=>
+    unicode(1) "a"
+    [1]=>
+    int(0)
+  }
+  [2]=>
+  array(2) {
+    [0]=>
+    unicode(1) "b"
+    [1]=>
+    int(1)
+  }
+  [3]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(3)
+  }
+  [4]=>
+  array(2) {
+    [0]=>
+    unicode(1) "c"
+    [1]=>
+    int(3)
+  }
+  [5]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(5)
+  }
+  [6]=>
+  array(2) {
+    [0]=>
+    unicode(1) "u"
+    [1]=>
+    int(5)
+  }
+  [7]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(6)
+  }
+}
+array(6) {
+  [0]=>
+  unicode(1) "a"
+  [1]=>
+  unicode(1) "b"
+  [2]=>
+  unicode(1) "2"
+  [3]=>
+  unicode(1) "c"
+  [4]=>
+  unicode(1) "3"
+  [5]=>
+  unicode(1) "u"
+}
+array(4) {
+  [0]=>
+  array(2) {
+    [0]=>
+    unicode(1) "a"
+    [1]=>
+    int(0)
+  }
+  [1]=>
+  array(2) {
+    [0]=>
+    unicode(1) "b"
+    [1]=>
+    int(1)
+  }
+  [2]=>
+  array(2) {
+    [0]=>
+    unicode(1) "c"
+    [1]=>
+    int(3)
+  }
+  [3]=>
+  array(2) {
+    [0]=>
+    unicode(1) "u"
+    [1]=>
+    int(5)
+  }
+}
+array(15) {
+  [0]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(0)
+  }
+  [1]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(0)
+  }
+  [2]=>
+  array(2) {
+    [0]=>
+    unicode(1) "a"
+    [1]=>
+    int(0)
+  }
+  [3]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(1)
+  }
+  [4]=>
+  array(2) {
+    [0]=>
+    unicode(1) "b"
+    [1]=>
+    int(1)
+  }
+  [5]=>
+  array(2) {
+    [0]=>
+    unicode(1) "2"
+    [1]=>
+    int(2)
+  }
+  [6]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(3)
+  }
+  [7]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(3)
+  }
+  [8]=>
+  array(2) {
+    [0]=>
+    unicode(1) "c"
+    [1]=>
+    int(3)
+  }
+  [9]=>
+  array(2) {
+    [0]=>
+    unicode(1) "3"
+    [1]=>
+    int(4)
+  }
+  [10]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(5)
+  }
+  [11]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(5)
+  }
+  [12]=>
+  array(2) {
+    [0]=>
+    unicode(1) "u"
+    [1]=>
+    int(5)
+  }
+  [13]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(6)
+  }
+  [14]=>
+  array(2) {
+    [0]=>
+    unicode(0) ""
+    [1]=>
+    int(6)
+  }
+}
+array(6) {
+  [0]=>
+  array(2) {
+    [0]=>
+    unicode(1) "a"
+    [1]=>
+    int(0)
+  }
+  [1]=>
+  array(2) {
+    [0]=>
+    unicode(1) "b"
+    [1]=>
+    int(1)
+  }
+  [2]=>
+  array(2) {
+    [0]=>
+    unicode(1) "2"
+    [1]=>
+    int(2)
+  }
+  [3]=>
+  array(2) {
+    [0]=>
+    unicode(1) "c"
+    [1]=>
+    int(3)
+  }
+  [4]=>
+  array(2) {
+    [0]=>
+    unicode(1) "3"
+    [1]=>
+    int(4)
+  }
+  [5]=>
+  array(2) {
+    [0]=>
+    unicode(1) "u"
+    [1]=>
+    int(5)
+  }
+}
+
+Warning: preg_last_error() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+bool(true)
+array(1) {
+  [0]=>
+  unicode(6) "ab2c3u"
+}
+bool(true)