summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorLars Strojny <lstrojny@php.net>2008-07-23 16:10:14 +0000
committerLars Strojny <lstrojny@php.net>2008-07-23 16:10:14 +0000
commit8e5f71dc94de6e8ed933b7be3794ce13a28013be (patch)
tree8cc662f59534e23d87d42b092b3c8b576bfd26fd /run-tests.php
parent5e1f4665e301e3d4b3786f1bc35173bfc00ec405 (diff)
downloadphp-git-8e5f71dc94de6e8ed933b7be3794ce13a28013be.tar.gz
Allowing "%unicode|string%" as a placeholder. In 6, this placeholder is resolved
to "unicode", in <6 to "string". This allows to easily write portable tests. Patch by uw
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/run-tests.php b/run-tests.php
index ad73e0db25..2546d02855 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -1711,6 +1711,11 @@ COMMAND $cmd
if (isset($section_text['EXPECTF'])) {
$wanted_re = preg_quote($wanted_re, '/');
+ $wanted_re = str_replace(
+ array('%unicode\|string%', '%string\|unicode%'),
+ version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'unicode',
+ $wanted_re
+ );
// Stick to basics
$wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re);
$wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re);