cvs: php4 / run-tests.php
| From: | Derick Rethans | Date: | Fri, 18 Oct 2002 20:34:41 +0000 |
| Subject: | cvs: php4 / run-tests.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-15028@lists.php.net to get a copy of this message | ||
derick Fri Oct 18 16:34:41 2002 EDT
Modified files:
/php4 run-tests.php
Log:
- Added %x for HEX chars
- Added %d as alias for %i (too much C here :)
- Added beginning and end markers to regexp
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.73 php4/run-tests.php:1.74
--- php4/run-tests.php:1.73 Thu Oct 17 10:07:32 2002
+++ php4/run-tests.php Fri Oct 18 16:34:41 2002
@@ -528,13 +528,15 @@
// Stick to basics
$wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy
$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\.+\-]+", $wanted_re);
/* DEBUG YOUR REGEX HERE
var_dump($wanted);
print(str_repeat('=', 80) . "\n");
var_dump($output);
*/
- if (preg_match("/$wanted_re/s", $output)) {
+ if (preg_match("/^$wanted_re$/s", $output)) {
echo "PASS $tested\n";
return 'PASSED';
}