diff options
author | Christian Couder <christian.couder@gmail.com> | 2016-11-30 22:04:09 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-01 14:55:32 -0800 |
commit | 3cefec9fc4d1a3aeb96bbdb10fbc5dd872a50505 (patch) | |
tree | 6cb2f8d7a993fe50446f321b696db0e583b50f58 | |
parent | 9e0cb8d8c201630ab03fdd06a78e8d3086002bda (diff) | |
download | git-3cefec9fc4d1a3aeb96bbdb10fbc5dd872a50505.tar.gz |
t0400: add test for 'put' command
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
-rwxr-xr-x | t/t0400-external-odb.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t0400-external-odb.sh b/t/t0400-external-odb.sh index 0f1bb97f38..6c6da5cf4f 100755 --- a/t/t0400-external-odb.sh +++ b/t/t0400-external-odb.sh @@ -57,4 +57,13 @@ test_expect_success 'helper can retrieve alt objects' ' test_cmp expect actual ' +test_expect_success 'helper can add objects to alt repo' ' + hash=$(echo "Hello odb!" | git hash-object -w -t blob --stdin) && + test -f .git/objects/$(echo $hash | sed "s#..#&/#") && + size=$(git cat-file -s "$hash") && + git cat-file blob "$hash" | ./odb-helper put "$hash" "$size" blob && + alt_size=$(cd alt-repo && git cat-file -s "$hash") && + test "$size" -eq "$alt_size" +' + test_done |