mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
Updated the test cases so that they use mb_regex_set_options.
Added a test for mb_regex_set_options.
This commit is contained in:
parent
e79772d6e0
commit
7b3fb01072
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
mb_regex_set_options( '' );
|
||||
print mb_ereg_replace( ' ', '-', 'a b c d e' )."\n";
|
||||
print mb_ereg_replace( '([a-z]+)','[\\1]', 'abc def ghi' );
|
||||
?>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
mb_regex_set_options( '' );
|
||||
mb_regex_encoding( 'EUC-JP' );
|
||||
|
||||
function verify_split( $spliton, $str, $count = 0 )
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php
|
||||
mb_regex_set_options( '' );
|
||||
|
||||
$encs = array( 'EUC-JP', 'Shift_JIS', 'SJIS', 'UTF-8' );
|
||||
|
||||
function test_ereg( $test_enc, $pat, $str, $in_enc = 'EUC-JP' ) {
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php
|
||||
mb_regex_set_options( '' );
|
||||
|
||||
$encs = array( 'EUC-JP', 'Shift_JIS', 'SJIS', 'UTF-8' );
|
||||
|
||||
function test_search( $test_enc, $str, $look_for, $opt, $in_enc = 'EUC-JP' ) {
|
||||
|
7
ext/mbstring/tests/025.inc
Normal file
7
ext/mbstring/tests/025.inc
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
mb_regex_set_options( 'x' );
|
||||
print mb_ereg_replace(' -', '+', '- - - - -' );
|
||||
|
||||
mb_regex_set_options( '' );
|
||||
print mb_ereg_replace(' -', '+', '- - - - -' );
|
||||
?>
|
11
ext/mbstring/tests/025.phpt
Normal file
11
ext/mbstring/tests/025.phpt
Normal file
@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
mb_regex_set_options()
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
function_exists('mb_regex_set_options') or die("SKIP");
|
||||
--POST--
|
||||
--GET--
|
||||
--FILE--
|
||||
<?php include('025.inc'); ?>
|
||||
--EXPECT--
|
||||
+ + + + +-++++
|
Loading…
Reference in New Issue
Block a user