summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelvyn Sopacua <msopacua@php.net>2002-10-10 16:08:15 +0000
committerMelvyn Sopacua <msopacua@php.net>2002-10-10 16:08:15 +0000
commitb5676a5b3e7d0cf468d3d3241b26cb95cf19fbd1 (patch)
tree90727afb1d3c1cd2adc12953c16dff5f795ba02f
parentd49b5762430403b25286eb90560b5040acd46545 (diff)
downloadphp-git-b5676a5b3e7d0cf468d3d3241b26cb95cf19fbd1.tar.gz
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
-rwxr-xr-xrun-tests.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/run-tests.php b/run-tests.php
index b814c6ec73..2ab928870e 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -118,6 +118,8 @@ if (isset($argc) && $argc > 1) {
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 @@ COMMAND $cmd
$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