hirokawa                                 Sun, 25 Sep 2011 08:55:27 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=317266

Log:
added test script for mb_ereg_replace_callback().

Changed paths:
    A   php/php-src/trunk/ext/mbstring/tests/mb_ereg_replace_callback.phpt

Added: php/php-src/trunk/ext/mbstring/tests/mb_ereg_replace_callback.phpt
===================================================================
--- php/php-src/trunk/ext/mbstring/tests/mb_ereg_replace_callback.phpt          
                (rev 0)
+++ php/php-src/trunk/ext/mbstring/tests/mb_ereg_replace_callback.phpt  
2011-09-25 08:55:27 UTC (rev 317266)
@@ -0,0 +1,15 @@
+--TEST--
+mb_ereg_replace_callback()
+--SKIPIF--
+<?php
+extension_loaded('mbstring') or die('skip mbstring not available');
+function_exists('mb_ereg_replace_callback') or die("skip 
mb_ereg_replace_callback() is not available in this build");
+?>
+--FILE--
+<?php
+$str = 'abc 123 #",; $foo';
+echo mb_ereg_replace_callback('(\S+)', function($m){return 
$m[1].'('.strlen($m[1]).')';}, $str);
+?>
+--EXPECT--
+abc(3) 123(3) #",;(4) $foo(4)
+


Property changes on: 
php/php-src/trunk/ext/mbstring/tests/mb_ereg_replace_callback.phpt
___________________________________________________________________
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to