From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 4/4] add a testcase for checking case insensitivity of mailmap
Date: Fri, 12 Jul 2013 14:38:55 -0700 [thread overview]
Message-ID: <1373665135-32484-5-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <1373665135-32484-1-git-send-email-gitster@pobox.com>
From: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t4203-mailmap.sh | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 842b754..07152e9 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -409,4 +409,37 @@ test_expect_success 'Blame output (complex mapping)' '
test_cmp expect actual.fuzz
'
+test_expect_success 'cleanup after mailmap.blob tests' '
+ rm -f .mailmap
+'
+
+cat >expect <<\EOF
+ 2 A <A@example.org>
+ 2 Other Author <other@author.xx>
+ 2 Santa Claus <santa.claus@northpole.xx>
+ 1 A U Thor <author@example.com>
+ 1 CTO <cto@company.xx>
+ 1 Some Dude <some@dude.xx>
+EOF
+
+test_expect_success 'Test case sensitivity of Names' '
+ # do a commit:
+ echo "asdf" > test1
+ git add test1
+ git commit -a --author="A <A@example.org>" -m "add test1"
+
+ # commit with same name, but different email
+ # (different capitalization does the trick already,
+ # but here I am going to use a different mail)
+ echo "asdf" > test2
+ git add test2
+ git commit -a --author="A <changed_email@example.org>" -m "add test2"
+
+ # Adding the line to the mailmap should make life easy, so we know
+ # it is the same person
+ echo "A <A@example.org> <changed_email@example.org>" > .mailmap
+
+ git shortlog -sne HEAD >actual && test_cmp expect actual
+'
+
test_done
--
1.8.3.2-941-gda9c3c8
next prev parent reply other threads:[~2013-07-12 21:39 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 ` [PATCH] mailmap: Testing the single letter name case Stefan Beller
2013-07-13 17:38 ` 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 ` Junio C Hamano [this message]
2013-07-12 22:38 ` [PATCH 4/4] add a testcase for checking case insensitivity of mailmap 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=1373665135-32484-5-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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).