]> granicus.if.org Git - zziplib/blobdiff - test/Makefile.am
initial
[zziplib] / test / Makefile.am
index e3133e139acae8db09cc977f94a19911336988fb..418e0178e22a9038637b9524a008134fc7db9d4e 100644 (file)
@@ -20,14 +20,14 @@ $(zzcat) $(zzdir) $(zziptest) $(zzxorcat) $(zzxordir) $(xorcopy) : \
 # -------------------------------------------------------------------
 NULL=/dev/null
 README = $(top_srcdir)/README
-testdatadir = $(top_srcdir)/test.tmp
+testdatadir = $(top_builddir)/testdata.d
 
 testzip testzips : test.zip test1.zip test2.zip test3.zip 
 
 test.zip tmp/../test.zip : $(README)
        - test -d tmp || mkdir tmp
        - $(MAKE) test0.zip && mv test0.zip $@
-       test -s $@ || cp $(srcdir)/test.zip $@
+       test -s $@ || cp $(srcdir)/test.zip $@
 test0.zip : $(README)
        test -f README || ln -s $(README) .
        - $(MKZIP) test_.zip README
@@ -74,6 +74,18 @@ test3.zip : # will not be shipped in source tarball
        ; else echo cp $(testdatadir)/$@ .; cp $(testdatadir)/$@ . \
        ; fi ; echo test -s $@ ; test -s $@
 
+test4.zip : # will not be shipped in source tarball
+       @ echo $(MKZIP) $@ ... "(1000 files)" \
+       ; mkdir test.tmp ; for h in 1 2 3 4 5 6 7 8 9 ; do : \
+       ; for i in 1 2 3 4 5 6 8 9 ; do for j in 1 2 3 4 5 6 7 8 9 \
+       ; do echo "file-$i" >test.tmp/file.$$h$$j$$i ; done done done \
+       ; (cd test.tmp && $(MKZIP) -n : ../$@ file.* >$(NULL)) \
+       ; rm -rf test.tmp
+       @      test -d $(testdatadir) || mkdir $(testdatadir); if test -s $@ \
+       ; then echo cp $@ $(testdatadir)/ ; cp $@ $(testdatadir)/ \
+       ; else echo cp $(testdatadir)/$@ .; cp $(testdatadir)/$@ . \
+       ; fi ; echo test -s $@ ; test -s $@
+
 test.dat : test.zip
        $(zzxorcopy) $? $@
 test1.dat : test1.zip
@@ -116,6 +128,8 @@ test2: $(zzcat)
        $(zzcat) test/README
 test3: $(zzdir)
        $(zzdir) test1.zip
+test4: $(zzdir) test4.zip
+       $(zzcat) test4/file.113
 
 check-test0 : $(zziptest)
        @ echo :$@: quick selftest