t6300: test refs pointing to tree and blob
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 <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder committed
Jul 10, 2020 at 18:47 UTC
6e2ef8eb06456e288a0a3cc451134479173cebc5
1 file changed
+19
t/t6300-for-each-ref.sh
+19
@@ -650,6 +650,25 @@ test_atom refs/tags/signed-long contents "subject line
650
body contents
651
$sig"
652
653
+test_expect_success 'set up refs pointing to tree and blob' '
654
+ git update-ref refs/mytrees/first refs/heads/master^{tree} &&
655
+ git update-ref refs/myblobs/first refs/heads/master:one
656
+'
657
+
658
+test_atom refs/mytrees/first subject ""
659
+test_atom refs/mytrees/first contents:subject ""
660
+test_atom refs/mytrees/first body ""
661
+test_atom refs/mytrees/first contents:body ""
662
+test_atom refs/mytrees/first contents:signature ""
663
+test_atom refs/mytrees/first contents ""
664
+
665
+test_atom refs/myblobs/first subject ""
666
+test_atom refs/myblobs/first contents:subject ""
667
+test_atom refs/myblobs/first body ""
668
+test_atom refs/myblobs/first contents:body ""
669
+test_atom refs/myblobs/first contents:signature ""
670
+test_atom refs/myblobs/first contents ""
671
+
672
test_expect_success 'set up multiple-sort tags' '
673
for when in 100000 200000
674
do