From: Wez Furlong Date: Thu, 7 Jul 2005 12:58:47 +0000 (+0000) Subject: Fix 2 bugs: X-Git-Tag: php-5.1.0b3~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6253c6c5e1e8cb9dd6557d5e8382fcaba2aa1d16;p=php Fix 2 bugs: - summary is only displayed if 2 or more tests were detected - error out of a bogus test name is passed in --- diff --git a/run-tests.php b/run-tests.php index 99722bc9ac..806828a1eb 100755 --- a/run-tests.php +++ b/run-tests.php @@ -305,6 +305,8 @@ HELP; find_files($testfile); } else if (preg_match("/\.phpt$/", $testfile)) { $test_files[] = $testfile; + } else { + die("bogus test name " . $argv[$i] . "\n"); } } } @@ -331,7 +333,7 @@ HELP; fclose($failed_tests_file); } $end_time = time(); - if (count($test_files) > 1) { + if (count($test_files)) { echo " ====================================================================="; compute_summary(); @@ -1236,7 +1238,6 @@ function compute_summary() $n_total = count($test_results); $n_total += $ignored_by_ext; - $sum_results = array('PASSED'=>0, 'WARNED'=>0, 'SKIPPED'=>0, 'FAILED'=>0, 'BORKED'=>0); foreach ($test_results as $v) { $sum_results[$v]++;