[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: [RFC/PATCH v3 05/16] t0400: add test for 'put' command
From: Christian Couder <christian.couder () gmail ! com>
Date: 2016-11-30 21:04:09
Message-ID: 20161130210420.15982-6-chriscool () tuxfamily ! org
[Download RAW message or body]
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
t/t0400-external-odb.sh | 9 +++++++++
1 file changed, 9 insertions(+)
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
--
2.11.0.rc2.37.geb49ca6
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic