cvs: php4 / run-tests.php
| From: | Derick Rethans | Date: | Tue, 08 Oct 2002 17:51:57 +0000 |
| Subject: | cvs: php4 / run-tests.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-14720@lists.php.net to get a copy of this message | ||
derick Tue Oct 8 13:51:57 2002 EDT
Modified files:
/php4 run-tests.php
Log:
- Fix .exp output
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.66 php4/run-tests.php:1.67
--- php4/run-tests.php:1.66 Tue Oct 8 04:53:51 2002
+++ php4/run-tests.php Tue Oct 8 13:51:57 2002
@@ -409,18 +409,18 @@
if (isset($section_text['EXPECTF'])) {
$wanted = trim($section_text['EXPECTF']);
- $wanted = preg_replace('/\r\n/',"\n",$wanted);
- $wanted = preg_quote($wanted, '/');
+ $wanted_re = preg_replace('/\r\n/',"\n",$wanted);
+ $wanted_re = preg_quote($wanted_re, '/');
// Stick to basics
- $wanted = str_replace("%s", ".*?", $wanted); //not greedy
- $wanted = str_replace("%i", "[0-9]+", $wanted);
- $wanted = str_replace("%f", "[0-9\.+\-]+", $wanted);
+ $wanted_re = str_replace("%s", ".*?", $wanted_re); //not greedy
+ $wanted_re = str_replace("%i", "[0-9]+", $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/s", $output)) {
+ if (preg_match("/$wanted_re/s", $output)) {
echo "PASS $tested\n";
return 'PASSED';
}