You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2010/11/23 19:18:57 UTC

svn commit: r1038255 - /buildr/trunk/spec/packaging/archive_spec.rb

Author: boisvert
Date: Tue Nov 23 18:18:57 2010
New Revision: 1038255

URL: http://svn.apache.org/viewvc?rev=1038255&view=rev
Log:
Also use Java's 'jar' command to test zip file validity

Modified:
    buildr/trunk/spec/packaging/archive_spec.rb

Modified: buildr/trunk/spec/packaging/archive_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/packaging/archive_spec.rb?rev=1038255&r1=1038254&r2=1038255&view=diff
==============================================================================
--- buildr/trunk/spec/packaging/archive_spec.rb (original)
+++ buildr/trunk/spec/packaging/archive_spec.rb Tue Nov 23 18:18:57 2010
@@ -426,7 +426,8 @@ describe "ZipTask" do
     checkZip(@archive)
   end
 
-  # Check for possible corruption usign Java's ZipInputStream since it's stricter than rubyzip
+  # Check for possible corruption using Java's ZipInputStream and Java's "jar" command since
+  # they are stricter than rubyzip
   def checkZip(file)
     return unless File.exist?(file)
     zip = Java.java.util.zip.ZipInputStream.new(Java.java.io.FileInputStream.new(file))
@@ -434,6 +435,8 @@ describe "ZipTask" do
       # just iterate over all entries
     end
     zip.close()
+
+    sh "#{File.join(ENV['JAVA_HOME'], 'bin', 'jar')} tvf #{file}"
   end
 
   def inspect_archive