From patchwork Wed Jan 30 21:33:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Wong X-Patchwork-Id: 10789311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 18D8713BF for ; Wed, 30 Jan 2019 21:33:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2914C2D75D for ; Wed, 30 Jan 2019 21:33:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 177D92D9B0; Wed, 30 Jan 2019 21:33:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08A4A2D75D for ; Wed, 30 Jan 2019 21:33:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732190AbfA3Vdu (ORCPT ); Wed, 30 Jan 2019 16:33:50 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:49756 "EHLO dcvr.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730971AbfA3Vdu (ORCPT ); Wed, 30 Jan 2019 16:33:50 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id DD3FB1F453; Wed, 30 Jan 2019 21:33:49 +0000 (UTC) Date: Wed, 30 Jan 2019 21:33:49 +0000 From: Eric Wong To: Junio C Hamano Cc: David Turner , SZEDER =?utf-8?b?R8OhYm9y?= , git@vger.kernel.org Subject: [PATCH v2] t1512: test ambiguous cat-file --batch and --batch-output Message-ID: <20190130213349.h5xiujbbtw4o3i35@dcvr> References: <20190118033845.s2vlrb3wd3m2jfzu@dcvr> <20190118104519.fqpzirux5qulkcwa@dcvr> <672a6fb9e480becbfcb5df23ae37193784811b6b.camel@novalis.org> <20190118222629.3nvcos24gmi6xe4i@dcvr> <20190123111117.GS840@szeder.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190123111117.GS840@szeder.dev> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP SZEDER Gábor wrote: > The 'git cat-file's error message and hints are translated, so they > should be checked by 'test_i18ngrep' instead of plain old grep. Thanks, here's v2 with test_i18ngrep --------8<------ Subject: [PATCH] t1512: test ambiguous cat-file --batch and --batch-output Test the new "ambiguous" result from cat-file --batch and --batch-check. This is in t1512 instead of t1006 since we need a repo with ambiguous object_id names. Signed-off-by: Eric Wong --- t/t1512-rev-parse-disambiguation.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh index e4d5b56014..c19fb500cb 100755 --- a/t/t1512-rev-parse-disambiguation.sh +++ b/t/t1512-rev-parse-disambiguation.sh @@ -388,4 +388,14 @@ test_expect_success C_LOCALE_OUTPUT 'ambiguous commits are printed by type first done ' +test_expect_success 'cat-file --batch and --batch-check show ambiguous' ' + echo "0000 ambiguous" >expect && + echo 0000 | git cat-file --batch-check >actual 2>err && + test_cmp expect actual && + test_i18ngrep hint: err && + echo 0000 | git cat-file --batch >actual 2>err && + test_cmp expect actual && + test_i18ngrep hint: err +' + test_done