Skip to content

Commit 6e2ef8e

Browse files
chriscoolgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9fcc9ca commit 6e2ef8e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

t/t6300-for-each-ref.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,25 @@ test_atom refs/tags/signed-long contents "subject line
650650
body contents
651651
$sig"
652652

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+
653672
test_expect_success 'set up multiple-sort tags' '
654673
for when in 100000 200000
655674
do

0 commit comments

Comments
 (0)