diff options
Diffstat (limited to 'ext/mbstring/tests')
-rw-r--r-- | ext/mbstring/tests/mb_split.phpt | 24 | ||||
-rw-r--r-- | ext/mbstring/tests/overload02.phpt | 2 | ||||
-rw-r--r-- | ext/mbstring/tests/php_gr_jp_10830.phpt | 4 | ||||
-rw-r--r-- | ext/mbstring/tests/php_gr_jp_dev_884-1.phpt | 3 | ||||
-rw-r--r-- | ext/mbstring/tests/php_gr_jp_dev_884-2.phpt | 8 |
5 files changed, 34 insertions, 7 deletions
diff --git a/ext/mbstring/tests/mb_split.phpt b/ext/mbstring/tests/mb_split.phpt index 1031cd26d7..c10b0d7b80 100644 --- a/ext/mbstring/tests/mb_split.phpt +++ b/ext/mbstring/tests/mb_split.phpt @@ -3,7 +3,6 @@ mb_split() --SKIPIF-- <?php extension_loaded('mbstring') or die('skip mbstring not available'); -extension_loaded('pcre') or die('skip pcre not available'); function_exists('mb_split') or die("skip mb_split() is not available in this build"); ?> --INI-- @@ -16,7 +15,7 @@ mbstring.func_overload=0 function verify_split( $spliton, $str, $count = 0 ) { $result1 = mb_split( $spliton, $str, $count ); - $result2 = preg_split( "/$spliton/", $str, $count ); + $result2 = split( $spliton, $str, $count ); if ( $result1 == $result2 ) { print "ok\n"; } else { @@ -27,7 +26,7 @@ mbstring.func_overload=0 var_dump( mb_split( b" ", b"a b c d e f g" ) == mb_split( b"[[:space:]]", b"a\nb\tc\nd e f g" ) ); - for ( $i = 1; $i < 5; ++$i ) { + for ( $i = 0; $i < 5; ++$i ) { verify_split( b" ", b"a\tb\tc\td e\tf g", $i ); } @@ -38,12 +37,31 @@ mbstring.func_overload=0 --EXPECTF-- bool(true) + +Deprecated: Function split() is deprecated in %s on line %d ok + +Deprecated: Function split() is deprecated in %s on line %d ok + +Deprecated: Function split() is deprecated in %s on line %d ok + +Deprecated: Function split() is deprecated in %s on line %d ok + +Deprecated: Function split() is deprecated in %s on line %d ok + +Deprecated: Function split() is deprecated in %s on line %d +ok + +Deprecated: Function split() is deprecated in %s on line %d 2-2 + +Deprecated: Function split() is deprecated in %s on line %d 3-3 + +Deprecated: Function split() is deprecated in %s on line %d 4-4 diff --git a/ext/mbstring/tests/overload02.phpt b/ext/mbstring/tests/overload02.phpt index ad007cc066..9b5cecdc40 100644 --- a/ext/mbstring/tests/overload02.phpt +++ b/ext/mbstring/tests/overload02.phpt @@ -24,7 +24,7 @@ $converted_str = mb_convert_encoding($str, 'Shift_JIS'); mb_regex_encoding('Shift_JIS'); foreach($ngchars as $c) { $c = mb_convert_encoding($c, 'Shift_JIS'); - $replaced = mb_convert_encoding(str_replace($c, '!!', $converted_str), mb_internal_encoding(), 'Shift_JIS'); + $replaced = mb_convert_encoding(ereg_replace($c, '!!', $converted_str), mb_internal_encoding(), 'Shift_JIS'); var_dump(strpos($replaced, '!!')); } ?> diff --git a/ext/mbstring/tests/php_gr_jp_10830.phpt b/ext/mbstring/tests/php_gr_jp_10830.phpt index f9599d995f..1cbfc2ae1f 100644 --- a/ext/mbstring/tests/php_gr_jp_10830.phpt +++ b/ext/mbstring/tests/php_gr_jp_10830.phpt @@ -10,9 +10,11 @@ function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build $a="aaa\n<>"; var_dump( mb_ereg("^[^><]+$",$a) ); -var_dump( !!preg_match("/^[^><]+$/",$a) ); +var_dump( ereg("^[^><]+$",$a) ); ?> --EXPECTF-- bool(false) + +Deprecated: Function ereg() is deprecated in %s on line %d bool(false) diff --git a/ext/mbstring/tests/php_gr_jp_dev_884-1.phpt b/ext/mbstring/tests/php_gr_jp_dev_884-1.phpt index 4978d0ce57..64fc054aab 100644 --- a/ext/mbstring/tests/php_gr_jp_dev_884-1.phpt +++ b/ext/mbstring/tests/php_gr_jp_dev_884-1.phpt @@ -8,9 +8,12 @@ function_exists('mb_ereg_replace') or die("skip mb_ereg_replace() is not availab --FILE-- <?php set_time_limit(2); +var_dump(ereg_replace(".*", "b", "a")); var_dump(preg_replace("/.*/", "b", "a")); var_dump(mb_ereg_replace(".*", "b", "a")); ?> --EXPECTF-- +Deprecated: Function ereg_replace() is deprecated in %s on line %d +string(2) "bb" string(2) "bb" string(2) "bb" diff --git a/ext/mbstring/tests/php_gr_jp_dev_884-2.phpt b/ext/mbstring/tests/php_gr_jp_dev_884-2.phpt index 2f74dff64b..937b2171b5 100644 --- a/ext/mbstring/tests/php_gr_jp_dev_884-2.phpt +++ b/ext/mbstring/tests/php_gr_jp_dev_884-2.phpt @@ -8,12 +8,16 @@ function_exists('mb_ereg_replace') or die("skip mb_ereg_replace() is not availab --FILE-- <?php var_dump(mb_ereg_replace("C?$", "Z", "ABC")); -var_dump(preg_replace("/C?$/", "Z", "ABC")); +var_dump(ereg_replace("C?$", "Z", "ABC")); var_dump(mb_ereg_replace("C*$", "Z", "ABC")); -var_dump(preg_replace("/C*$/", "Z", "ABC")); +var_dump(ereg_replace("C*$", "Z", "ABC")); ?> --EXPECTF-- string(4) "ABZZ" + +Deprecated: Function ereg_replace() is deprecated in %s on line %d string(4) "ABZZ" string(4) "ABZZ" + +Deprecated: Function ereg_replace() is deprecated in %s on line %d string(4) "ABZZ" |