[PATCH 8/8] one ugly test to verify basic functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
---
 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 <<EOF &&
+three
+two
+one
+EOF
+	test_cmp expected actual
+	)
+'
+
+test_done
-- 
2.7.0.377.g4cd97dd

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]