From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id D18071F934 for ; Wed, 13 Jan 2021 00:58:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438044AbhALVhS (ORCPT ); Tue, 12 Jan 2021 16:37:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436855AbhALUTa (ORCPT ); Tue, 12 Jan 2021 15:19:30 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89D15C0617BB for ; Tue, 12 Jan 2021 12:18:48 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id y187so3318890wmd.3 for ; Tue, 12 Jan 2021 12:18:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1/KwABnLhIWPuW6zI9VQL7LiE4m978JsQXxUfjG0lXY=; b=uLjAhUQLu6Kl32mdVqeLVHkw7d4My29L6Etlfx1gRZImQATODqqOKHGuQCjA43hX65 irV+CE+ag1CQb/0KmTtOWae4BcypYhcIPnhwsB16GQL1coKg+mGsqjgeqqa1C8FwQhiQ lshszjndiJ/S00dN0cOMEDso3cC5uK3WKBzIQ0Q7w1rkFJTQFIfCEckw5h1PrJM+vmsj bO9AjxK+ijCvOpbi2GAGWfsFLHcenG5s1O4ro8wAx2fjrPYSfDU5vLmFG2U25L5Rmeqz VGlw3cB4Jn/CiKk0QBCi+Sjkm60U+hbDqLzagZxisIEM3J4/aLqv0csWC9BjSXFdtjHY ZtQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1/KwABnLhIWPuW6zI9VQL7LiE4m978JsQXxUfjG0lXY=; b=JvXr9BrakD/HDlJF7fKJMSeEKGqTqY7lTMm4E2dwk5S6SB2dAIdQKyP2ipkZ6zTvPz dGouOlLhOXCkUUi9lIElrNUg1XEH+hNt1sqG5kPXq9RVa3PHkxItXxhJuBGypOKfRnmm x9ZaVKReuVIbI3RihD/4++OQnkpvk8vu2oA2wXUfndINmu/ghBAZcZp5aCnf8b9Xde3J 4g3bKcpuOLNYJOnh7KOsxYtuwFM0YgQgk3+flCto4n3NmGqUFS7Vx/NNRsElgX6PYSFk 7JxjLl0W7MZsQDuOi5EBz0dYAU3wUIRp+fHmYjGWyqXzfSGE0O1ng9mGbWJ17VeAvsVk 5t0Q== X-Gm-Message-State: AOAM531FodpZxmTAanFJoqvE5kX9BQVZGAloooHKHrlVpMbux9CPPjyN ZY8pTcwz+wzCO2Cc2ec+2EMCl2d8ITnjOQ== X-Google-Smtp-Source: ABdhPJxbvxDw/dnFykY6Fxewv1eaJXo5ZdGEfvWZc/gMZSob1zcaRVJ+8TH2KVBmZvL82FTi5Nel6g== X-Received: by 2002:a05:600c:410d:: with SMTP id j13mr857586wmi.95.1610482727006; Tue, 12 Jan 2021 12:18:47 -0800 (PST) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id c10sm7095374wrb.92.2021.01.12.12.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 12:18:45 -0800 (PST) From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= To: git@vger.kernel.org Cc: Junio C Hamano , Johannes Sixt , Johannes Schindelin , "brian m . carlson" , =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= , =?UTF-8?q?Martin=20=C3=85gren?= Subject: [PATCH 18/22] mailmap tests: add a test for comment syntax Date: Tue, 12 Jan 2021 21:18:02 +0100 Message-Id: <20210112201806.13284-19-avarab@gmail.com> X-Mailer: git-send-email 2.29.2.222.g5d2a92d10f8 In-Reply-To: <20210105130359.21139-1-avarab@gmail.com> References: <20210105130359.21139-1-avarab@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add a test for mailmap comment syntax. As noted in [1] there was no test coverage for this. Let's make sure a future change doesn't break it. 1. https://lore.kernel.org/git/CAN0heSoKYWXqskCR=GPreSHc6twCSo1345WTmiPdrR57XSShhA@mail.gmail.com/ Reported-by: Martin Ågren Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t4203-mailmap.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index 96ba5367c6..10e672e006 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -753,4 +753,37 @@ test_expect_success 'commit --author honors mailmap' ' test_cmp expect actual ' +test_expect_success 'comment syntax: setup' ' + test_create_repo comm && + test_commit -C comm --author "A " A && + test_commit -C comm --author "B " B && + test_commit -C comm --author "C <#@example.com>" C && + test_commit -C comm --author "D " D && + + test_config -C comm mailmap.file ../doc.map && + cat >>doc.map <<-\EOF && + # Ah + + ; Bee + Cee <#@example.com> + Dee + EOF + + cat >expect <<-\EOF && + Author A maps to A + Committer C O Mitter maps to C O Mitter + + Author B maps to ; Bee + Committer C O Mitter maps to C O Mitter + + Author C <#@example.com> maps to Cee + Committer C O Mitter maps to C O Mitter + + Author D maps to Dee + Committer C O Mitter maps to C O Mitter + EOF + git -C comm log --reverse --pretty=format:"Author %an <%ae> maps to %aN <%aE>%nCommitter %cn <%ce> maps to %cN <%cE>%n" >actual && + test_cmp expect actual +' + test_done -- 2.29.2.222.g5d2a92d10f8