You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2012/10/20 11:42:23 UTC

svn commit: r1400399 - /buildr/trunk/spec/core/common_spec.rb

Author: donaldp
Date: Sat Oct 20 09:42:23 2012
New Revision: 1400399

URL: http://svn.apache.org/viewvc?rev=1400399&view=rev
Log:
Use mode that works under windows

Modified:
    buildr/trunk/spec/core/common_spec.rb

Modified: buildr/trunk/spec/core/common_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/core/common_spec.rb?rev=1400399&r1=1400398&r2=1400399&view=diff
==============================================================================
--- buildr/trunk/spec/core/common_spec.rb (original)
+++ buildr/trunk/spec/core/common_spec.rb Sat Oct 20 09:42:23 2012
@@ -542,10 +542,11 @@ describe Buildr::Filter do
 
   it 'should preserve mode bits except readable' do
     # legacy: pending "Pending the release of the fix for JRUBY-4927" if RUBY_PLATFORM =~ /java/
-    Dir['src/*'].each { |file| File.chmod(0o755, file) }
+    mode = 0o600
+    Dir['src/*'].each { |file| File.chmod(mode, file) }
     @filter.from('src').into('target').run
     Dir['target/*'].sort.each do |file|
-      (File.stat(file).mode & 0o755).should == 0o755
+      (File.stat(file).mode & mode).should == mode
     end
   end
 end