Skip to content

Commit

Permalink
push test4.zip into the megabyte range
Browse files Browse the repository at this point in the history
  • Loading branch information
gdraheim committed Apr 25, 2017
1 parent 2878190 commit 5696078
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ check-local: check-readme $(sfxtests) $(newtests)
check-tests: tests
tests:
@ test -f zziptests.py || cp -s -v $(srcdir)/zziptests.py .
python zziptests.py -v --exeext "$(EXEEXT)" --topsrcdir "$(top_srcdir)"
python zziptests.py --exeext "$(EXEEXT)" --topsrcdir "$(top_srcdir)"

check-readme : $(zzcat) test.zip
@ test -f test.zip || $(MAKE) tmp/../test.zip
Expand Down
2 changes: 1 addition & 1 deletion test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ check-local: check-readme $(sfxtests) $(newtests)
check-tests: tests
tests:
@ test -f zziptests.py || cp -s -v $(srcdir)/zziptests.py .
python zziptests.py -v
python zziptests.py --exeext "$(EXEEXT)" --topsrcdir "$(top_srcdir)"

check-readme : $(zzcat) test.zip
@ test -f test.zip || $(MAKE) tmp/../test.zip
Expand Down
72 changes: 36 additions & 36 deletions test/zziptests.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ def test_103_make_test3_zip(self):
def test_104_make_test4_zip(self):
""" create a test4.zip for later tests using standard 'zip'
It will NOT fall back to a variant in the source code.
The archive has 1000 generic files with known content
and they are NOT stored compressed in the archive. """
The archive has 10000 generic files with known content
and they are stored (NOT compressed) in the archive. """
zipfile="test4.zip"
tmpdir="test4.tmp"
exe=self.bins("mkzip")
for i in xrange(1000):
filename = os.path.join(tmpdir,"file.%03i" % i)
filetext = "file-%03i\n" % i
for i in xrange(10000):
filename = os.path.join(tmpdir,"file%04i.txt" % i)
filetext = "file-%04i\n" % i
self.mkfile(filename, filetext)
filename = os.path.join(tmpdir,"README")
filetext = self.readme()
Expand Down Expand Up @@ -312,9 +312,9 @@ def test_214_zzcat_test4_zip(self):
run = shell("{exe} {getfile} | tee {logfile}".format(**locals()))
self.assertGreater(os.path.getsize(logfile), 10)
self.assertEqual(run.output.split("\n"), self.readme().split("\n"))
getfile = "test4/file.999"
getfile = "test4/file9999.txt"
run = shell("{exe} {getfile}".format(**locals()))
self.assertEqual("file-999\n", run.output)
self.assertEqual("file-9999\n", run.output)
def test_220_zzdir_test0_zip(self):
""" run zzdir on test0.zip using just 'test0' """
zipfile = "test0.zip"
Expand Down Expand Up @@ -364,9 +364,9 @@ def test_224_zzdir_test4_zip(self):
getfile = "test4"
exe = self.bins("zzdir")
run = shell("{exe} {getfile} ".format(**locals()))
self.assertIn(' file.001\n', run.output)
self.assertIn(' file.222\n', run.output)
self.assertIn(' file.999\n', run.output)
self.assertIn(' file0001.txt\n', run.output)
self.assertIn(' file2222.txt\n', run.output)
self.assertIn(' file9999.txt\n', run.output)
self.assertNotIn(' defl:N ', run.output)
self.assertIn(' stored ', run.output)
def test_320_zzxordir_test0_dat(self):
Expand Down Expand Up @@ -443,9 +443,9 @@ def test_324_zzxordir_test4_zip(self):
self.assertIn("did not open test", run.errors)
exe = self.bins("zzxordir")
run = shell("{exe} {getfile} ".format(**locals()))
self.assertIn(' file.001\n', run.output)
self.assertIn(' file.222\n', run.output)
self.assertIn(' file.999\n', run.output)
self.assertIn(' file0001.txt\n', run.output)
self.assertIn(' file2222.txt\n', run.output)
self.assertIn(' file9999.txt\n', run.output)
self.assertNotIn(' defl:N ', run.output)
self.assertIn(' stored ', run.output)
def test_340_zzxorcat_test0_zip(self):
Expand Down Expand Up @@ -513,9 +513,9 @@ def test_344_zzxorcat_test4_zip(self):
run = shell("{exe} {getfile} | tee {logfile}".format(**locals()))
self.assertGreater(os.path.getsize(logfile), 10)
self.assertEqual(run.output.split("\n"), self.readme().split("\n"))
getfile = "test4x/file.999"
getfile = "test4x/file9999.txt"
run = shell("{exe} {getfile}".format(**locals()))
self.assertEqual("file-999\n", run.output)
self.assertEqual("file-9999\n", run.output)
#####################################################################
# check unzzip
#####################################################################
Expand Down Expand Up @@ -639,9 +639,9 @@ def test_424_zzcat_mem_test4_zip(self):
run = shell("{exe} -p {zipfile} {getfile} | tee {logfile}".format(**locals()))
self.assertGreater(os.path.getsize(logfile), 10)
self.assertEqual(run.output.split("\n"), self.readme().split("\n"))
getfile = "file.999"
getfile = "file9999.txt"
run = shell("{exe} -p {zipfile} {getfile}".format(**locals()))
self.assertEqual("file-999\n", run.output)
self.assertEqual("file-9999\n", run.output)
def test_430_zzcat_mix_test0_zip(self):
""" run zzcat-mix on test.zip using just archive README """
zipfile = "test0.zip"
Expand Down Expand Up @@ -696,9 +696,9 @@ def test_434_zzcat_mix_test4_zip(self):
run = shell("{exe} -p {zipfile} {getfile} | tee {logfile}".format(**locals()))
self.assertGreater(os.path.getsize(logfile), 10)
self.assertEqual(run.output.split("\n"), self.readme().split("\n"))
getfile = "file.999"
getfile = "file9999.txt"
run = shell("{exe} -p {zipfile} {getfile}".format(**locals()))
self.assertEqual("file-999\n", run.output)
self.assertEqual("file-9999\n", run.output)
def test_440_zzcat_zap_test0_zip(self):
""" run zzcat-zap on test.zip using just archive README """
zipfile = "test0.zip"
Expand Down Expand Up @@ -753,9 +753,9 @@ def test_444_zzcat_zap_test4_zip(self):
run = shell("{exe} -p {zipfile} {getfile} | tee {logfile}".format(**locals()))
self.assertGreater(os.path.getsize(logfile), 10)
self.assertEqual(run.output.split("\n"), self.readme().split("\n"))
getfile = "file.999"
getfile = "file9999.txt"
run = shell("{exe} -p {zipfile} {getfile}".format(**locals()))
self.assertEqual("file-999\n", run.output)
self.assertEqual("file-9999\n", run.output)

def test_500_infozipdir_test0_zip(self):
""" run info-zip dir test0.zip """
Expand Down Expand Up @@ -799,9 +799,9 @@ def test_504_infozipdir_big_test4_zip(self):
getfile = "test4.zip"
exe = self.bins("unzip")
run = shell("{exe} -l {getfile} ".format(**locals()))
self.assertIn(' file.001\n', run.output)
self.assertIn(' file.222\n', run.output)
self.assertIn(' file.999\n', run.output)
self.assertIn(' file0001.txt\n', run.output)
self.assertIn(' file2222.txt\n', run.output)
self.assertIn(' file9999.txt\n', run.output)
def test_510_zzdir_big_test0_zip(self):
""" run zzdir-big on test0.zip """
zipfile = "test0.zip"
Expand Down Expand Up @@ -844,9 +844,9 @@ def test_514_zzdir_big_test4_zip(self):
getfile = "test4.zip"
exe = self.bins("unzzip-big")
run = shell("{exe} -l {getfile} ".format(**locals()))
self.assertIn(' file.001\n', run.output)
self.assertIn(' file.222\n', run.output)
self.assertIn(' file.999\n', run.output)
self.assertIn(' file0001.txt\n', run.output)
self.assertIn(' file2222.txt\n', run.output)
self.assertIn(' file9999.txt\n', run.output)
def test_520_zzdir_mem_test0_zip(self):
""" run zzdir-mem on test0.zip """
zipfile = "test0.zip"
Expand Down Expand Up @@ -896,9 +896,9 @@ def test_524_zzdir_mem_test4_zip(self):
getfile = "test4.zip"
exe = self.bins("unzzip-mem")
run = shell("{exe} -v {getfile} ".format(**locals()))
self.assertIn(' file.001\n', run.output)
self.assertIn(' file.222\n', run.output)
self.assertIn(' file.999\n', run.output)
self.assertIn(' file0001.txt\n', run.output)
self.assertIn(' file2222.txt\n', run.output)
self.assertIn(' file9999.txt\n', run.output)
self.assertNotIn(' defl:N ', run.output)
self.assertIn(' stored ', run.output)
def test_530_zzdir_mix_test0_zip(self):
Expand Down Expand Up @@ -951,9 +951,9 @@ def test_534_zzdir_mix_test4_zip(self):
getfile = "test4.zip"
exe = self.bins("unzzip-mix")
run = shell("{exe} -v {getfile} ".format(**locals()))
self.assertIn(' file.001\n', run.output)
self.assertIn(' file.222\n', run.output)
self.assertIn(' file.999\n', run.output)
self.assertIn(' file0001.txt\n', run.output)
self.assertIn(' file2222.txt\n', run.output)
self.assertIn(' file9999.txt\n', run.output)
self.assertNotIn(' defl:N ', run.output)
self.assertIn(' stored ', run.output)
def test_540_zzdir_zap_test0_zip(self):
Expand Down Expand Up @@ -1005,9 +1005,9 @@ def test_544_zzdir_zap_test4_zip(self):
getfile = "test4.zip"
exe = self.bins("unzzip")
run = shell("{exe} -v {getfile} ".format(**locals()))
self.assertIn(' file.001\n', run.output)
self.assertIn(' file.222\n', run.output)
self.assertIn(' file.999\n', run.output)
self.assertIn(' file0001.txt\n', run.output)
self.assertIn(' file2222.txt\n', run.output)
self.assertIn(' file9999.txt\n', run.output)
self.assertNotIn(' defl:N ', run.output)
self.assertIn(' stored ', run.output)

Expand Down

0 comments on commit 5696078

Please sign in to comment.