From: Nguyễn Thái Ngọc Duy Date: Fri, 05 Feb 2016 08:57:57 GMT Subject: [PATCH 8/8] one ugly test to verify basic functionality Message-ID: <1454662677-15137-9-git-send-email-pclouds@gmail.com> In-Reply-To: <1454662677-15137-1-git-send-email-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t5544-fetch-resume.sh (new +x) | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 t/t5544-fetch-resume.sh diff --git a/t/t5544-fetch-resume.sh b/t/t5544-fetch-resume.sh new file mode 100755 index 0000000..dfa033d --- /dev/null +++ b/t/t5544-fetch-resume.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +test_description='what' + +. ./test-lib.sh + +test_expect_success 'what' ' + test_commit one && + git clone --no-local .git abc && + ( + cd abc && + mv `ls .git/objects/pack/*.pack` pack && + git unpack-objects < pack && + rm pack && + git fsck + ) && + test_commit two && + test_commit three && + ( + cd abc && + git fetch --resume-pack=foo origin HEAD && + git log --format=%s origin/master >actual && + echo one >expected && + test_cmp expected actual && + rm .git/FETCH_HEAD && + mv `ls .git/objects/pack/*.pack` pack && + head -c 123 pack >tmp && + git fetch --resume-pack=tmp origin && + test_path_is_missing tmp && + cmp pack .git/objects/pack/*.pack && + git fsck && + git log --format=%s origin/master >actual && + cat >expected <