diff options
author | Wez Furlong <wez@php.net> | 2005-07-07 12:58:47 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-07-07 12:58:47 +0000 |
commit | 6253c6c5e1e8cb9dd6557d5e8382fcaba2aa1d16 (patch) | |
tree | e069faee15093ef6d5aca17f0f8675c3f27c8069 /run-tests.php | |
parent | 93024bc26885653fa9b91da02cdd1060bf4a86ce (diff) | |
download | php-git-6253c6c5e1e8cb9dd6557d5e8382fcaba2aa1d16.tar.gz |
Fix 2 bugs:
- summary is only displayed if 2 or more tests were detected
- error out of a bogus test name is passed in
Diffstat (limited to 'run-tests.php')
-rwxr-xr-x | run-tests.php | 5 |
1 files changed, 3 insertions, 2 deletions
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]++; |