summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorHannes Magnusson <bjori@php.net>2009-04-16 13:39:31 +0000
committerHannes Magnusson <bjori@php.net>2009-04-16 13:39:31 +0000
commit8906ef059d98379e6920ae802c4aeba0fa36a42f (patch)
tree57b84f445c997f7bc7c2971b635bd08a4e344e08 /run-tests.php
parent701fe7630e7c398a3d159525633d7981dfe883ba (diff)
downloadphp-git-8906ef059d98379e6920ae802c4aeba0fa36a42f.tar.gz
Sync WS with 5.3
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php52
1 files changed, 26 insertions, 26 deletions
diff --git a/run-tests.php b/run-tests.php
index 26b48efacb..26ac65b937 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -2,7 +2,7 @@
<?php
/*
+----------------------------------------------------------------------+
- | PHP Version 6, 6 |
+ | PHP Version 5, 6 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2009 The PHP Group |
+----------------------------------------------------------------------+
@@ -1737,34 +1737,34 @@ COMMAND $cmd
$wanted_re = preg_replace('/\r\n/', "\n", $wanted);
if (isset($section_text['EXPECTF'])) {
-
- // do preg_quote, but miss out any %r delimited sections
- $temp = "";
- $r = "%r";
- $startOffset = 0;
- $length = strlen($wanted_re);
- while($startOffset < $length) {
- $start = strpos($wanted_re, $r, $startOffset);
- if ($start !== false) {
- // we have found a start tag
- $end = strpos($wanted_re, $r, $start+2);
- if ($end === false) {
- // unbalanced tag, ignore it.
- $end = $start = $length;
+
+ // do preg_quote, but miss out any %r delimited sections
+ $temp = "";
+ $r = "%r";
+ $startOffset = 0;
+ $length = strlen($wanted_re);
+ while($startOffset < $length) {
+ $start = strpos($wanted_re, $r, $startOffset);
+ if ($start !== false) {
+ // we have found a start tag
+ $end = strpos($wanted_re, $r, $start+2);
+ if ($end === false) {
+ // unbalanced tag, ignore it.
+ $end = $start = $length;
+ }
+ } else {
+ // no more %r sections
+ $start = $end = $length;
}
- } else {
- // no more %r sections
- $start = $end = $length;
+ // quote a non re portion of the string
+ $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/');
+ // add the re unquoted.
+ $temp = $temp . '(' . substr($wanted_re, $start+2, ($end - $start-2)). ')';
+ $startOffset = $end + 2;
}
- // quote a non re portion of the string
- $temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/');
- // add the re unquoted.
- $temp = $temp . '(' . substr($wanted_re, $start+2, ($end - $start-2)). ')';
- $startOffset = $end + 2;
- }
- $wanted_re = $temp;
+ $wanted_re = $temp;
- $wanted_re = str_replace(
+ $wanted_re = str_replace(
array('%binary_string_optional%'),
version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'binary string',
$wanted_re