my %t; # keyword to test case mapping
my @miss; # test cases without keywords set
+my $count;
+
for $t (split(/ /, $TESTCASES)) {
if(loadtest("${TESTDIR}/test${t}")) {
# bad case
if(!$what[0]) {
push @miss, $t;
+ next;
}
for(@what) {
$k{$_}++;
$t{$_} .= "$_ ";
}
+ $count++;
}
-my @mtest = reverse sort { $k{$a} <=> $k{$b} } keys %k;
+# numerically on amount, or alphebetically if same amount
+my @mtest = reverse sort { $k{$a} <=> $k{$b} || $b cmp $a } keys %k;
print <<TOP
<table><tr><th>No Tests</th><th>Keyword</th></tr>
for $t (@mtest) {
printf "<tr><td>%d</td><td>$t</td></tr>\n", $k{$t};
}
-print "</table>\n";
+printf "</table><p> $count tests (%d lack keywords)\n",
+ scalar(@miss);
for(@miss) {
print STDERR "$_ ";
}
+
+print STDERR "\n";