git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <stefanbeller@googlemail.com>
To: sunshine@sunshineco.com, git@vger.kernel.org, gitster@pobox.com
Cc: Stefan Beller <stefanbeller@googlemail.com>
Subject: [PATCH] mailmap: Testing the single letter name case.
Date: Sat, 13 Jul 2013 09:20:20 +0200	[thread overview]
Message-ID: <1373700020-30436-1-git-send-email-stefanbeller@googlemail.com> (raw)
In-Reply-To: <1373665135-32484-2-git-send-email-gitster@pobox.com>

This is a regression test for a66e77eab70a08938fdc2227b7ada0f0465c6991

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
---
 t/t4203-mailmap.sh | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 842b754..9ec87a2 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -409,4 +409,45 @@ test_expect_success 'Blame output (complex mapping)' '
 	test_cmp expect actual.fuzz
 '
 
+cat >expect <<\EOF
+A <ShortName@company.xy> (2):
+      eighth
+      nineth
+
+A U Thor <author@example.com> (1):
+      initial
+
+CTO <cto@company.xx> (1):
+      seventh
+
+Other Author <other@author.xx> (2):
+      third
+      fourth
+
+Santa Claus <santa.claus@northpole.xx> (2):
+      fifth
+      sixth
+
+Some Dude <some@dude.xx> (1):
+      second
+
+EOF
+
+# Regression test
+# Using a single letter name to check for off-by-one errors in parse_name_and_email
+test_expect_success 'check mapping for short names' '
+	echo one >two &&
+	git add two &&
+	git commit --author "A <shortname@company.xx>" -m "eighth" &&
+
+	echo two >> two &&
+	git add two &&
+	git commit --author "A <ShortName@company.xy>" -m "nineth" &&
+
+	echo "A <ShortName@company.xy> <shortname@company.xx>" >> .mailmap &&
+	git shortlog HEAD -e >actual
+
+	test_cmp expect actual
+'
+
 test_done
-- 
1.8.3.2.776.gfcf213d

  reply	other threads:[~2013-07-13  7:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12 21:38 [PATCH 0/4] Microfixes to mailmap Junio C Hamano
2013-07-12 21:38 ` [PATCH 1/4] mailmap: do not lose single-letter names Junio C Hamano
2013-07-13  7:20   ` Stefan Beller [this message]
2013-07-13 17:38     ` [PATCH] mailmap: Testing the single letter name case Junio C Hamano
2013-07-13 18:14       ` Stefan Beller
2013-07-13 20:20         ` Junio C Hamano
2013-07-15  2:31           ` Eric Sunshine
2013-07-15 15:54             ` Junio C Hamano
2013-07-14  2:38     ` Eric Sunshine
2013-07-12 21:38 ` [PATCH 2/4] mailmap: do not downcase mailmap entries Junio C Hamano
2013-07-12 21:38 ` [PATCH 3/4] mailmap: style fixes Junio C Hamano
2013-07-12 21:38 ` [PATCH 4/4] add a testcase for checking case insensitivity of mailmap Junio C Hamano
2013-07-12 22:38   ` Eric Sunshine
2013-07-12 22:51   ` Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1373700020-30436-1-git-send-email-stefanbeller@googlemail.com \
    --to=stefanbeller@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).