cvs: php-src(PHP_5_2) / run-tests.php
| From: | Robin Fernandes | Date: | Wed, 03 Dec 2008 14:27:43 +0000 |
| Subject: | cvs: php-src(PHP_5_2) / run-tests.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-54659@lists.php.net to get a copy of this message | ||
robinf Wed Dec 3 14:27:43 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src run-tests.php
Log:
Add support for %u|b% and %unicode_string_optional% to facilitate writing tests compatible with
both 5_2 and HEAD.
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.50&r2=1.226.2.37.2.51&diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.50 php-src/run-tests.php:1.226.2.37.2.51
--- php-src/run-tests.php:1.226.2.37.2.50 Sat Nov 8 02:05:03 2008
+++ php-src/run-tests.php Wed Dec 3 14:27:43 2008
@@ -24,7 +24,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: run-tests.php,v 1.226.2.37.2.50 2008/11/08 02:05:03 scottmac Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.51 2008/12/03 14:27:43 robinf Exp $ */
/* Sanity check to ensure that pcre extension needed by this script is available.
* In the event it is not, print a nice error message indicating that this script will
@@ -608,7 +608,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
- echo '$Revision: 1.226.2.37.2.50 $' . "\n";
+ echo '$Revision: 1.226.2.37.2.51 $' . "\n";
exit(1);
default:
@@ -1726,10 +1726,20 @@
if (isset($section_text['EXPECTF'])) {
$wanted_re = preg_quote($wanted_re, '/');
$wanted_re = str_replace(
+ array('%unicode_string_optional%'),
+ version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'Unicode
string',
+ $wanted_re
+ );
+ $wanted_re = str_replace(
array('%unicode\|string%', '%string\|unicode%'),
version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' :
'unicode',
$wanted_re
);
+ $wanted_re = str_replace(
+ array('%u\|b%', '%b\|u%'),
+ version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? '' : 'u',
+ $wanted_re
+ );
// Stick to basics
$wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re);
$wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re);