[PATCH 3/3] t: mailmap: add simple name translation test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 t/t4203-mailmap.sh |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index b1bc521..589e39e 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -157,6 +157,9 @@ A U Thor <author@xxxxxxxxxxx> (1):
 CTO <cto@xxxxxxxxxx> (1):
       seventh
 
+Mr. Right <right@xxxxxxxxxx> (1):
+      eight
+
 Other Author <other@xxxxxxxxx> (2):
       third
       fourth
@@ -196,6 +199,11 @@ test_expect_success 'Shortlog output (complex mapping)' '
 	test_tick &&
 	git commit --author "CTO <cto@xxxxxxxxxxx>" -m seventh &&
 
+	echo eight >>one &&
+	git add one &&
+	test_tick &&
+	git commit --author "Wrong <right@xxxxxxxxxx>" -m eight &&
+
 	mkdir -p internal_mailmap &&
 	echo "Committed <committer@xxxxxxxxxxx>" > internal_mailmap/.mailmap &&
 	echo "<cto@xxxxxxxxxx>                       <cto@xxxxxxxxxxx>" >> internal_mailmap/.mailmap &&
@@ -204,6 +212,7 @@ test_expect_success 'Shortlog output (complex mapping)' '
 	echo "Other Author <other@xxxxxxxxx>         <nick2@xxxxxxxxxx>" >> internal_mailmap/.mailmap &&
 	echo "Santa Claus <santa.claus@xxxxxxxxxxxx> <me@xxxxxxxxxx>" >> internal_mailmap/.mailmap &&
 	echo "Santa Claus <santa.claus@xxxxxxxxxxxx> <me@xxxxxxxxxx>" >> internal_mailmap/.mailmap &&
+	echo "Mr. Right <right@xxxxxxxxxx>" >> internal_mailmap/.mailmap &&
 
 	git shortlog -e HEAD >actual &&
 	test_cmp expect actual
@@ -212,6 +221,9 @@ test_expect_success 'Shortlog output (complex mapping)' '
 
 # git log with --pretty format which uses the name and email mailmap placemarkers
 cat >expect <<\EOF
+Author Wrong <right@xxxxxxxxxx> maps to Mr. Right <right@xxxxxxxxxx>
+Committer C O Mitter <committer@xxxxxxxxxxx> maps to Committed <committer@xxxxxxxxxxx>
+
 Author CTO <cto@xxxxxxxxxxx> maps to CTO <cto@xxxxxxxxxx>
 Committer C O Mitter <committer@xxxxxxxxxxx> maps to Committed <committer@xxxxxxxxxxx>
 
@@ -248,6 +260,7 @@ OBJID (Other Author DATE 4) four
 OBJID (Santa Claus  DATE 5) five
 OBJID (Santa Claus  DATE 6) six
 OBJID (CTO          DATE 7) seven
+OBJID (Mr. Right    DATE 8) eight
 EOF
 test_expect_success 'Blame output (complex mapping)' '
 	git blame one >actual &&
@@ -264,6 +277,7 @@ OBJID (<other@xxxxxxxxx>          DATE 4) four
 OBJID (<santa.claus@xxxxxxxxxxxx> DATE 5) five
 OBJID (<santa.claus@xxxxxxxxxxxx> DATE 6) six
 OBJID (<cto@xxxxxxxxxx>           DATE 7) seven
+OBJID (<right@xxxxxxxxxx>         DATE 8) eight
 EOF
 test_expect_success 'Blame output (complex mapping)' '
 	git blame -e one >actual &&
-- 
1.7.9.1.g97f7d

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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]