|
@@ -34,6 +34,7 @@ from dulwich.pack import (
|
|
|
write_pack,
|
|
|
apply_delta,
|
|
|
create_delta,
|
|
|
+ read_zlib,
|
|
|
)
|
|
|
|
|
|
pack1_sha = 'bc63ddad95e7321ee734ea11a7a62d314e0d7481'
|
|
@@ -260,3 +261,13 @@ class TestPackIndexWritingv2(unittest.TestCase, BaseTestPackIndexWriting):
|
|
|
self._has_crc32_checksum = True
|
|
|
self._expected_version = 2
|
|
|
self._write_fn = write_pack_index_v2
|
|
|
+
|
|
|
+TEST_COMP1 = """\x78\x9c\x9d\x8e\xc1\x0a\xc2\x30\x10\x44\xef\xf9\x8a\xbd\xa9\x08\x92\x86\xb4\x26\x20\xe2\xd9\x83\x78\xf2\xbe\x49\x37\xb5\xa5\x69\xca\x36\xf5\xfb\x4d\xfd\x04\x67\x6e\x33\xcc\xf0\x32\x13\x81\xc6\x16\x8d\xa9\xbd\xad\x6c\xe3\x8a\x03\x4a\x73\xd6\xda\xd5\xa6\x51\x2e\x58\x65\x6c\x13\xbc\x94\x4a\xcc\xc8\x34\x65\x78\xa4\x89\x04\xae\xf9\x9d\x18\xee\x34\x46\x62\x78\x11\x4f\x29\xf5\x03\x5c\x86\x5f\x70\x5b\x30\x3a\x3c\x25\xee\xae\x50\xa9\xf2\x60\xa4\xaa\x34\x1c\x65\x91\xf0\x29\xc6\x3e\x67\xfa\x6f\x2d\x9e\x9c\x3e\x7d\x4b\xc0\x34\x8f\xe8\x29\x6e\x48\xa1\xa0\xc4\x88\xf3\xfe\xb0\x5b\x20\x85\xb0\x50\x06\xe4\x6e\xdd\xca\xd3\x17\x26\xfa\x49\x23"""
|
|
|
+
|
|
|
+
|
|
|
+class ZlibTests(unittest.TestCase):
|
|
|
+
|
|
|
+ def test_simple_decompress(self):
|
|
|
+ self.assertEquals(("tree 4ada885c9196b6b6fa08744b5862bf92896fc002\nparent None\nauthor Jelmer Vernooij <jelmer@samba.org> 1228980214 +0000\ncommitter Jelmer Vernooij <jelmer@samba.org> 1228980214 +0000\n\nProvide replacement for mmap()'s offset argument.", 158),
|
|
|
+ read_zlib(TEST_COMP1, 0, 229))
|
|
|
+
|