msopacua Thu Oct 10 12:08:15 2002 EDT Modified files: /php4 run-tests.php Log: When you say string, match at least one char in EXPECTF section Plus a little protection against globbing like ext/foo/tests/* or worse. # yes, I've done that Index: php4/run-tests.php diff -u php4/run-tests.php:1.67 php4/run-tests.php:1.68 --- php4/run-tests.php:1.67 Tue Oct 8 13:51:57 2002 +++ php4/run-tests.php Thu Oct 10 12:08:15 2002 @@ -118,6 +118,8 @@ if (count($test_to_run)) { echo "Running selected tests.\n"; foreach($test_to_run AS $name=>$runnable) { + if(!preg_match("/\.phpt$/", $name)) + continue; echo "test: $name runnable: $runnable\n"; if ($runnable) { $test_results[$name] = run_test($php,$name); @@ -412,7 +414,7 @@ $wanted_re = preg_replace('/\r\n/',"\n",$wanted); $wanted_re = preg_quote($wanted_re, '/'); // Stick to basics - $wanted_re = str_replace("%s", ".*?", $wanted_re); //not greedy + $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
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php