X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft1006-cat-file.sh;h=d8b7f2ffbcc0427b1ae9d48feb4387f580e81d61;hb=ca02ad3447efdbd4cb2aa9ba0ee3fc6124035274;hp=973aef7a8e0949ea381626e5d3b49445f63423ef;hpb=4e44ae45fe96c6972c3e5d4aac2a149972429deb;p=git.git diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh index 973aef7a8..d8b7f2ffb 100755 --- a/t/t1006-cat-file.sh +++ b/t/t1006-cat-file.sh @@ -174,9 +174,27 @@ do ' done -test_expect_success "--batch-check for a non-existent object" ' - test "deadbeef missing" = \ - "$(echo_without_newline deadbeef | git cat-file --batch-check)" +test_expect_success "--batch-check for a non-existent named object" ' + test "foobar42 missing +foobar84 missing" = \ + "$( ( echo foobar42; echo_without_newline foobar84; ) | git cat-file --batch-check)" +' + +test_expect_success "--batch-check for a non-existent hash" ' + test "0000000000000000000000000000000000000042 missing +0000000000000000000000000000000000000084 missing" = \ + "$( ( echo 0000000000000000000000000000000000000042; + echo_without_newline 0000000000000000000000000000000000000084; ) \ + | git cat-file --batch-check)" +' + +test_expect_success "--batch for an existent and a non-existent hash" ' + test "$tag_sha1 tag $tag_size +$tag_content +0000000000000000000000000000000000000000 missing" = \ + "$( ( echo $tag_sha1; + echo_without_newline 0000000000000000000000000000000000000000; ) \ + | git cat-file --batch)" ' test_expect_success "--batch-check for an emtpy line" '