From 866be6ece467187879e256ea87294683dfe191ce Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Wed, 29 Jul 2020 23:14:00 +0000 Subject: [PATCH] t7063: make hash size independent Use test_oid instead of hard-coding algorithm-specific constants and all-zero values. Signed-off-by: brian m. carlson Reviewed-by: Eric Sunshine Signed-off-by: Junio C Hamano --- 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 <