From patchwork Wed Jul 29 23:14:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 11691847 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 0989613B6 for ; Wed, 29 Jul 2020 23:14:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8DF82067D for ; Wed, 29 Jul 2020 23:14:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="y1KTWjBJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728051AbgG2XOy (ORCPT ); Wed, 29 Jul 2020 19:14:54 -0400 Received: from injection.crustytoothpaste.net ([192.241.140.119]:41044 "EHLO injection.crustytoothpaste.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727982AbgG2XOw (ORCPT ); Wed, 29 Jul 2020 19:14:52 -0400 Received: from camp.crustytoothpaste.net (unknown [IPv6:2001:470:b978:101:b610:a2f0:36c1:12e3]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by injection.crustytoothpaste.net (Postfix) with ESMTPSA id DEB6760CF7; Wed, 29 Jul 2020 23:14:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1596064491; bh=eIQvm60Oj7JsGGMhk9Joi/xuIDtV9T/uP4vMss0aCBA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=y1KTWjBJlu9agytFd0omZlJ8wDsmpbGa+Ji/QcSqo+1W/lk5ia7khqSqad4OtrvrW +3S/+wUHiobYPu2sCP4p+zepMh5CAy7qvTyESf328TBs4JM5H9GsvCTfzsMBM+2K+p QVXBnmFUTuO6o+iMmQ+b3o9TonaBpVevygrCirFPcEq2VwC2yLGSukkp8K7ki0MZII aIo3HXYN/4jfubpEwiIr28f6KLrrHrjdmnm3+a+rnlEeIqKP/dHFUzFljfoaryLHNO aXzV+wSlEjRGzykPCRB+WWeuqeOp/7bEWT7Jy77vuI1HjCCqgQlJV5pkFFFQCBoMad +ZVFjqp6hyafYNdtCzoQ/dYP2+66jJY2PafLjjzthzla4n3XMP1eRnD+UFiZFfWMni G5M2OwxoSJK/AFwXcL5+991ZSdptyLJ+mc0GaoRtbu3bZvrFXRAKwIN3ULU6Ds9NLf lcqNKBHnmw/nMHgOUYktd4PaxQGIHbsvw4IUmar1HO8CN0afT+N From: "brian m. carlson" To: Cc: Eric Sunshine Subject: [PATCH v6 11/39] t7063: make hash size independent Date: Wed, 29 Jul 2020 23:14:00 +0000 Message-Id: <20200729231428.3658647-12-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.28.0.163.g6104cc2f0b6 In-Reply-To: <20200729231428.3658647-1-sandals@crustytoothpaste.net> References: <20200728233446.3066485-1-sandals@crustytoothpaste.net> <20200729231428.3658647-1-sandals@crustytoothpaste.net> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Use test_oid instead of hard-coding algorithm-specific constants and all-zero values. Signed-off-by: brian m. carlson --- t/t7063-status-untracked-cache.sh | 150 ++++++++++++++++-------------- 1 file changed, 80 insertions(+), 70 deletions(-) diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh index 428cff9cf3..a682a3d826 100755 --- a/t/t7063-status-untracked-cache.sh +++ b/t/t7063-status-untracked-cache.sh @@ -75,14 +75,24 @@ test_expect_success 'setup' ' touch one two three done/one dtwo/two dthree/three && git add one two done/one && : >.git/info/exclude && - git update-index --untracked-cache + git update-index --untracked-cache && + test_oid_cache <<-EOF + root sha1:e6fcc8f2ee31bae321d66afd183fcb7237afae6e + root sha256:b90c672088c015b9c83876e919da311bad4cd39639fb139f988af6a11493b974 + + exclude sha1:13263c0978fb9fad16b2d580fb800b6d811c3ff0 + exclude sha256:fe4aaa1bbbbce4cb8f73426748a14c5ad6026b26f90505a0bf2494b165a5b76c + + done sha1:1946f0437f90c5005533cbe1736a6451ca301714 + done sha256:7f079501d79f665b3acc50f5e0e9e94509084d5032ac20113a37dd5029b757cc + EOF ' test_expect_success 'untracked cache is empty' ' test-tool dump-untracked-cache >../actual && cat >../expect-empty <../dump.expect <../actual && cat >../expect <../actual && cat >../expect <../actual && cat >../expect <../actual && cat >../expect <../actual && cat >../expect <../actual && cat >../expect <../actual && cat >../expect <../actual && cat >../expect <../actual && cat >../expect <../actual && cat >../expect-from-test-dump <../actual && grep -F "recurse valid" ../actual >../actual.grep && cat >../expect.grep <