diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-10-19 14:15:51 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-10-19 14:15:51 -0700 |
commit | c7deb8dac1f24498a353327ec9fceb99695582c2 (patch) | |
tree | 58c819d4a87c8e4fed16fdc615ce8579a4230536 /t/annotate-tests.sh | |
parent | Merge branch 'maint' (diff) | |
parent | t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To' (diff) | |
download | tgif-c7deb8dac1f24498a353327ec9fceb99695582c2.tar.xz |
Merge branch 'maint'
* maint:
t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To'
Clarify and extend the "git diff" format documentation
git-show-ref.txt: clarify the pattern matching
documentation: git-config minor cleanups
Update test script annotate-tests.sh to handle missing/extra authors
Diffstat (limited to 't/annotate-tests.sh')
-rw-r--r-- | t/annotate-tests.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh index 396b9653a3..141b60cdcb 100644 --- a/t/annotate-tests.sh +++ b/t/annotate-tests.sh @@ -8,27 +8,27 @@ check_count () { $PROG file $head >.result || return 1 cat .result | perl -e ' my %expect = (@ARGV); - my %count = (); + my %count = map { $_ => 0 } keys %expect; while (<STDIN>) { if (/^[0-9a-f]+\t\(([^\t]+)\t/) { my $author = $1; for ($author) { s/^\s*//; s/\s*$//; } - if (exists $expect{$author}) { - $count{$author}++; - } + $count{$author}++; } } my $bad = 0; while (my ($author, $count) = each %count) { my $ok; - if ($expect{$author} != $count) { + my $value = 0; + $value = $expect{$author} if defined $expect{$author}; + if ($value != $count) { $bad = 1; $ok = "bad"; } else { $ok = "good"; } - print STDERR "Author $author (expected $expect{$author}, attributed $count) $ok\n"; + print STDERR "Author $author (expected $value, attributed $count) $ok\n"; } exit($bad); ' "$@" |