diff options
author | Nuno Lopes <nlopess@php.net> | 2007-09-14 15:28:03 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2007-09-14 15:28:03 +0000 |
commit | 40085b06f2884a5c3e73c54cc730bde73af60c1b (patch) | |
tree | 53f28db5309d025c5a08bd5ce533ebe40e85923b /run-tests.php | |
parent | b121ffae92b4594625b986dd83be4facfe7f0571 (diff) | |
download | php-git-40085b06f2884a5c3e73c54cc730bde73af60c1b.tar.gz |
changes to run-tests.php:
- change %s to %a
- make %s = [^\r\n]+
- fix tests accordingly
Diffstat (limited to 'run-tests.php')
-rwxr-xr-x | run-tests.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/run-tests.php b/run-tests.php index f360af267c..1f9bac1572 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1486,14 +1486,15 @@ COMMAND $cmd if (isset($section_text['EXPECTF'])) { $wanted_re = preg_quote($wanted_re, '/'); // Stick to basics - $wanted_re = str_replace("%e", '\\' . DIRECTORY_SEPARATOR, $wanted_re); - $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy - $wanted_re = str_replace("%w", "\s*", $wanted_re); - $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); - $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); - $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); - $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); - $wanted_re = str_replace("%c", ".", $wanted_re); + $wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re); + $wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re); + $wanted_re = str_replace('%a', '.+', $wanted_re); + $wanted_re = str_replace('%w', '\s*', $wanted_re); + $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); + $wanted_re = str_replace('%d', '\d+', $wanted_re); + $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re); + $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E-?\d+)?', $wanted_re); + $wanted_re = str_replace('%c', '.', $wanted_re); // %f allows two points "-.0.0" but that is the best *simple* expression } /* DEBUG YOUR REGEX HERE |