if(! -r $CURLCMD) {
# this is not a test
+ print "$NUMBER doesn't look like a test case!\n";
next;
}
if ( $TESTCASES eq "all") {
# Get all commands and find out their test numbers
opendir(DIR, $TESTDIR) || die "can't opendir $TESTDIR: $!";
- my @cmds = grep { /^command/ && -f "$TESTDIR/$_" } readdir(DIR);
+ my @cmds = grep { /^command([0-9]+).txt/ && -f "$TESTDIR/$_" } readdir(DIR);
closedir DIR;
$TESTCASES=""; # start with no test cases
#
my $testnum;
+my $ok=0;
+my $total=0;
foreach $testnum (split(" ", $TESTCASES)) {
- if(singletest($testnum) && !$anyway) {
+ $total++;
+ my $error = singletest($testnum);
+ if($error && !$anyway) {
# a test failed, abort
print "\n - abort tests\n";
last;
}
+ elsif(!$error) {
+ $ok++;
+ }
# loop for next test
}
stopserver($FTPPIDFILE);
stopserver($PIDFILE);
+print "$ok tests out of $total reported OK\n";