You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by to...@apache.org on 2010/04/22 06:23:36 UTC

svn commit: r936609 - /buildr/trunk/spec/java/packaging_spec.rb

Author: toulmean
Date: Thu Apr 22 04:23:36 2010
New Revision: 936609

URL: http://svn.apache.org/viewvc?rev=936609&view=rev
Log:
allow the MANIFEST.MF file to be the first or the second entry of the jar, as META-INF/ is counted as first entry by jruby

Modified:
    buildr/trunk/spec/java/packaging_spec.rb

Modified: buildr/trunk/spec/java/packaging_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/java/packaging_spec.rb?rev=936609&r1=936608&r2=936609&view=diff
==============================================================================
--- buildr/trunk/spec/java/packaging_spec.rb (original)
+++ buildr/trunk/spec/java/packaging_spec.rb Thu Apr 22 04:23:36 2010
@@ -435,7 +435,9 @@ describe Packaging, 'jar' do
     define('foo', :version=>'1.0') { package(:jar) }
     project('foo').package(:jar).invoke
     Zip::ZipFile.open(project('foo').package(:jar).to_s) do |jar|
-      jar.entries.map(&:to_s).first.should == 'META-INF/MANIFEST.MF'
+      entries_to_s = jar.entries.map(&:to_s)
+      # Sometimes META-INF/ is counted as first entry, which is fair game.
+      (entries_to_s.first == 'META-INF/MANIFEST.MF' || entries_to_s[1] == 'META-INF/MANIFEST.MF').should be_true
     end
   end