summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-10-19 14:15:51 -0700
committerJunio C Hamano <gitster@pobox.com>2010-10-19 14:15:51 -0700
commitc7deb8dac1f24498a353327ec9fceb99695582c2 (patch)
tree58c819d4a87c8e4fed16fdc615ce8579a4230536 /t
parent38a18873b21f6f2eebedc65aff2249fd6ec2168c (diff)
parent5b57413cb3952654031115f6f840e3dcb120914e (diff)
downloadgit-c7deb8dac1f24498a353327ec9fceb99695582c2.tar.gz
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')
-rw-r--r--t/annotate-tests.sh12
-rwxr-xr-xt/t9001-send-email.sh2
2 files changed, 7 insertions, 7 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);
' "$@"
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 6f67da4e71..a298eb0437 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -279,7 +279,7 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' '
--to=nobody@example.com \
--in-reply-to=" " \
--smtp-server="$(pwd)/fake.sendmail" \
- $patches
+ $patches \
2>errors
! grep "^In-Reply-To: < *>" msgtxt1
'