From patchwork Fri Jul 10 16:47:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Couder X-Patchwork-Id: 11657135 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 436F513B4 for ; Fri, 10 Jul 2020 16:48:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B6A12078B for ; Fri, 10 Jul 2020 16:48:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hSJrVHqF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728238AbgGJQsC (ORCPT ); Fri, 10 Jul 2020 12:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727782AbgGJQsA (ORCPT ); Fri, 10 Jul 2020 12:48:00 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A50BEC08C5DC for ; Fri, 10 Jul 2020 09:48:00 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id l2so6564642wmf.0 for ; Fri, 10 Jul 2020 09:48:00 -0700 (PDT) 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=lYrDVd7wyGZYsrhz66x2LRHV4OKXEXPgDl0TkGx8avk=; b=hSJrVHqFFFGjcutOj/q1JtE124ECyVgTbYR7nw54ds83eDrqQHUL07Qb3HT5t5EmpD El0/fEfqGM/pxVnEj0Oa3i/zpDJxEi5mTci7bLu26cnvCRIhMxb6zkHy6cssAl9oRRkV htb8KvkgrRKpWdeHgQ6kOiGbjVD6RDvtvzLZApCINpH2P8XPGdS7OQv3d84moH4/BZwd 6y9n6Ntyr/1HOKxN3AAk3CpT0q2eVu7zSl1x19NV+EUf64oAWQKbiUoUpo7/sEHWLQfI ph9Wm+7oVngm7+skTxwU2ee25iJYdmP7gNG4pooqh99mXwsdyLNpxCj6ZREA/4R29Y2w BnGg== 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=lYrDVd7wyGZYsrhz66x2LRHV4OKXEXPgDl0TkGx8avk=; b=dF2EVWQSAoVzvY5k6bbAkepfmdiJr9/9ZYsYkb0IylGPs67TtzNLK2tvG/7BNIaRpE b8xO4lpeLqUmh1QEHW2NunoQLnSsBHApmYj8/CL30HSnrEbCVsgCMFezG5dDFDuXGcG9 MBtKC20F0P4LcgjBV+R6tnSjOm3SSv6atMCQ+l2JU6lM+aR6ClwydCGxJUBIgn4WDdde N1F2AV4oA6Pf0zUSHec1EkvNs8WYktKrtybb2oKYdImDrqlHyT5YGw3ucgKgC/nCvfNv UhuiVYprNHBWo486+b+W7fdMMdiMtc8GprCaRgiA7IBX/YQaDlTUEMneumU7n+Cml6gy jhNA== X-Gm-Message-State: AOAM533s7c2Ivf4qsjahambsYd/n4qqwxdI7Hu+7vD/vp69oHMcIu7cn aey+xocPPm/YFaAOemNWUrepJBj83hI= X-Google-Smtp-Source: ABdhPJxT/aWrxBtEXPPt1VTIkcg9en1157DAuOwo+kpyKI9QbwHTuh09jNNdO5JMU63e040ImPKsSA== X-Received: by 2002:a7b:c2f7:: with SMTP id e23mr5930656wmk.175.1594399679131; Fri, 10 Jul 2020 09:47:59 -0700 (PDT) Received: from localhost.localdomain ([185.228.229.54]) by smtp.gmail.com with ESMTPSA id m4sm9883385wmi.48.2020.07.10.09.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 09:47:58 -0700 (PDT) From: Christian Couder X-Google-Original-From: Christian Couder To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Christian Couder Subject: [PATCH v4 2/3] t6300: test refs pointing to tree and blob Date: Fri, 10 Jul 2020 18:47:38 +0200 Message-Id: <20200710164739.6616-3-chriscool@tuxfamily.org> X-Mailer: git-send-email 2.27.0.347.gb620d8b0da In-Reply-To: <20200710164739.6616-1-chriscool@tuxfamily.org> References: <20200707174049.21714-1-chriscool@tuxfamily.org> <20200710164739.6616-1-chriscool@tuxfamily.org> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Adding tests for refs pointing to tree and blob shows that we care about testing both positive ("see, my shiny new toy does work") and negative ("and it won't do nonsensical things when given an input it is not designed to work with") cases. Signed-off-by: Christian Couder --- t/t6300-for-each-ref.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index da59fadc5d..e9f468d360 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -650,6 +650,25 @@ test_atom refs/tags/signed-long contents "subject line body contents $sig" +test_expect_success 'set up refs pointing to tree and blob' ' + git update-ref refs/mytrees/first refs/heads/master^{tree} && + git update-ref refs/myblobs/first refs/heads/master:one +' + +test_atom refs/mytrees/first subject "" +test_atom refs/mytrees/first contents:subject "" +test_atom refs/mytrees/first body "" +test_atom refs/mytrees/first contents:body "" +test_atom refs/mytrees/first contents:signature "" +test_atom refs/mytrees/first contents "" + +test_atom refs/myblobs/first subject "" +test_atom refs/myblobs/first contents:subject "" +test_atom refs/myblobs/first body "" +test_atom refs/myblobs/first contents:body "" +test_atom refs/myblobs/first contents:signature "" +test_atom refs/myblobs/first contents "" + test_expect_success 'set up multiple-sort tags' ' for when in 100000 200000 do