# HG changeset patch
# User Jan Pipek <jan.pipek@gmail.com>
# Date 1568130273 -7200
#      Tue Sep 10 17:44:33 2019 +0200
# Node ID 7dec84bf88d88a3f084bd2c03e9733a3eaae3371
# Parent  4bd7eff9971f351ac70f3c149874fc2f9d04a316
Additional test on ZIP files

diff --git a/tests/codec/ber/test_decoder.py b/tests/codec/ber/test_decoder.py
--- a/tests/codec/ber/test_decoder.py
+++ b/tests/codec/ber/test_decoder.py
@@ -1720,6 +1720,20 @@
         finally:
             os.remove(path)
 
+    def testZipfileMany(self):
+        _, path = tempfile.mkstemp(suffix=".zip")
+        try:
+            with zipfile.ZipFile(path, "w") as myzip:
+                #for i in range(100):
+                myzip.writestr("data", ints2octs((2, 1, 12, 35, 128, 3, 2, 0, 169, 3, 2, 1, 138, 0, 0)) * 1000)
+
+            with zipfile.ZipFile(path, "r") as myzip:
+                with myzip.open("data", "r") as source:
+                    values = list(decoder.decodeStream(source))
+                    assert values == [12, (1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1)] * 1000
+        finally:
+            os.remove(path)
+
 
 suite = unittest.TestLoader().loadTestsFromModule(sys.modules[__name__])