diff options
Diffstat (limited to 't/t5701-git-serve.sh')
-rwxr-xr-x | t/t5701-git-serve.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh index 509f379d49..73e74a9c54 100755 --- a/t/t5701-git-serve.sh +++ b/t/t5701-git-serve.sh @@ -19,6 +19,7 @@ test_expect_success 'test capability advertisement' ' fetch=shallow server-option object-format=$(test_oid algo) + object-info 0000 EOF @@ -240,4 +241,29 @@ test_expect_success 'unexpected lines are not allowed in fetch request' ' grep "unexpected line: .this-is-not-a-command." err ' +# Test the basics of object-info +# +test_expect_success 'basics of object-info' ' + test-tool pkt-line pack >in <<-EOF && + command=object-info + object-format=$(test_oid algo) + 0001 + size + oid $(git rev-parse two:two.t) + oid $(git rev-parse two:two.t) + 0000 + EOF + + cat >expect <<-EOF && + size + $(git rev-parse two:two.t) $(wc -c <two.t | xargs) + $(git rev-parse two:two.t) $(wc -c <two.t | xargs) + 0000 + EOF + + test-tool serve-v2 --stateless-rpc <in >out && + test-tool pkt-line unpack <out >actual && + test_cmp expect actual +' + test_done |