This is a regression test for a66e77eab70a08938fdc2227b7ada0f0465c6991

Signed-off-by: Stefan Beller <stefanbel...@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 <shortn...@company.xy> (2):
+      eighth
+      nineth
+
+A U Thor <aut...@example.com> (1):
+      initial
+
+CTO <c...@company.xx> (1):
+      seventh
+
+Other Author <ot...@author.xx> (2):
+      third
+      fourth
+
+Santa Claus <santa.cl...@northpole.xx> (2):
+      fifth
+      sixth
+
+Some Dude <s...@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 <shortn...@company.xx>" -m "eighth" &&
+
+       echo two >> two &&
+       git add two &&
+       git commit --author "A <shortn...@company.xy>" -m "nineth" &&
+
+       echo "A <shortn...@company.xy> <shortn...@company.xx>" >> .mailmap &&
+       git shortlog HEAD -e >actual
+
+       test_cmp expect actual
+'
+
 test_done
-- 
1.8.3.2.776.gfcf213d

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to