summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-04-16 23:15:12 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-04-16 23:15:12 +0000
commit0bf9a5704bd325b08f0c08fa9664d79b852b4db9 (patch)
treeea85f54884bea0d22cbc87fa85a6c8b80e86d974
parent8182d17ae110b88788b6a94345af268d37fffb3e (diff)
downloadgnurl-0bf9a5704bd325b08f0c08fa9664d79b852b4db9.tar.gz
gnurl-0bf9a5704bd325b08f0c08fa9664d79b852b4db9.tar.bz2
gnurl-0bf9a5704bd325b08f0c08fa9664d79b852b4db9.zip
minor edits, report the test cases without keywords
-rwxr-xr-xtests/keywords.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/keywords.pl b/tests/keywords.pl
index 535c54e82..2c83b546f 100755
--- a/tests/keywords.pl
+++ b/tests/keywords.pl
@@ -53,6 +53,8 @@ my %k; # keyword count
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
@@ -62,6 +64,7 @@ for $t (split(/ /, $TESTCASES)) {
if(!$what[0]) {
push @miss, $t;
+ next;
}
for(@what) {
@@ -70,9 +73,11 @@ for $t (split(/ /, $TESTCASES)) {
$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>
@@ -81,8 +86,11 @@ TOP
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";