From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Contreras Subject: [PATCH 2/2] t: mailmap: add simple name translation test Date: Tue, 14 Feb 2012 18:11:34 +0200 Message-ID: <1329235894-20581-3-git-send-email-felipe.contreras@gmail.com> References: <1329235894-20581-1-git-send-email-felipe.contreras@gmail.com> Cc: Felipe Contreras , "Marius Storm-Olsen" , "Jim Meyering" , "Jonathan Nieder" To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue Feb 14 17:12:52 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RxKzq-00034t-6T for gcvg-git-2@plane.gmane.org; Tue, 14 Feb 2012 17:12:50 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756300Ab2BNQMq (ORCPT ); Tue, 14 Feb 2012 11:12:46 -0500 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]:51541 "EHLO mail-lpp01m010-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756310Ab2BNQMj (ORCPT ); Tue, 14 Feb 2012 11:12:39 -0500 Received: by mail-lpp01m010-f46.google.com with SMTP id u2so116469lag.19 for ; Tue, 14 Feb 2012 08:12:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=FvqvoVQ+izd1hGDoETMcG4mYVFSA66kdgZAQsKpnS3E=; b=H9mHEBBYjOTp/R/t9aXgz7Xg9Dyi2aJhigYhz3xlUSJ8sgZ7zeK3yG9GbVFNiWNo8z V6bJAEacDvG3u4m9fDx7sIcWILHn7XWhcGZeUibq91kBPr8vQSheBznWfYkZirbHxfoU 8cA0hyolWIMUb6Qd7v2aHEIbO3Q+3DttKrTL8= Received: by 10.112.23.65 with SMTP id k1mr7301788lbf.77.1329235958246; Tue, 14 Feb 2012 08:12:38 -0800 (PST) Received: from localhost (a91-153-255-128.elisa-laajakaista.fi. [91.153.255.128]) by mx.google.com with ESMTPS id id7sm16501106lab.16.2012.02.14.08.12.37 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Feb 2012 08:12:37 -0800 (PST) X-Mailer: git-send-email 1.7.9.1.g97f7d In-Reply-To: <1329235894-20581-1-git-send-email-felipe.contreras@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Signed-off-by: Felipe Contreras --- 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 db12265..fc3855a 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -157,6 +157,9 @@ A U Thor (1): CTO (1): seventh +Mr. Right (1): + eight + Other Author (2): third fourth @@ -196,6 +199,11 @@ test_expect_success 'Shortlog output (complex mapping)' ' test_tick && git commit --author "CTO " -m seventh && + echo eight >>one && + git add one && + test_tick && + git commit --author "Wrong " -m eight && + mkdir -p internal_mailmap && echo "Committed " > internal_mailmap/.mailmap && echo " " >> internal_mailmap/.mailmap && @@ -204,6 +212,7 @@ test_expect_success 'Shortlog output (complex mapping)' ' echo "Other Author " >> internal_mailmap/.mailmap && echo "Santa Claus " >> internal_mailmap/.mailmap && echo "Santa Claus " >> internal_mailmap/.mailmap && + echo "Mr. Right " >> 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 maps to Mr. Right +Committer C O Mitter maps to Committed + Author CTO maps to CTO Committer C O Mitter maps to Committed @@ -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 ( DATE 4) four OBJID ( DATE 5) five OBJID ( DATE 6) six OBJID ( DATE 7) seven +OBJID ( DATE 8) eight EOF test_expect_success 'Blame output (complex mapping)' ' git blame -e one >actual && -- 1.7.9.1.g97f7d