Skip to content

Commit

Permalink
Avoid warnings about ()
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Mar 4, 2011
1 parent c3ed110 commit 1ed75ec
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/rubygems/test_gem_installer.rb
Expand Up @@ -181,7 +181,7 @@ def test_generate_bin_bindir
assert_equal true, File.directory?(util_inst_bindir)
installed_exec = File.join(util_inst_bindir, 'executable')
assert_equal true, File.exist?(installed_exec)
assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
assert_equal mask, File.stat(installed_exec).mode unless win_platform?

wrapper = File.read installed_exec
assert_match %r|generated by RubyGems|, wrapper
Expand All @@ -196,7 +196,7 @@ def test_generate_bin_script
assert_equal true, File.directory?(util_inst_bindir)
installed_exec = File.join(util_inst_bindir, 'executable')
assert_equal true, File.exist?(installed_exec)
assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
assert_equal mask, File.stat(installed_exec).mode unless win_platform?

wrapper = File.read installed_exec
assert_match %r|generated by RubyGems|, wrapper
Expand Down Expand Up @@ -249,7 +249,7 @@ def test_generate_bin_script_install_dir

installed_exec = File.join("#{@gemhome}2", 'bin', 'executable')
assert_equal true, File.exist?(installed_exec)
assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
assert_equal mask, File.stat(installed_exec).mode unless win_platform?

wrapper = File.read installed_exec
assert_match %r|generated by RubyGems|, wrapper
Expand Down Expand Up @@ -298,7 +298,7 @@ def test_generate_bin_script_no_shebang

installed_exec = File.join @gemhome, 'bin', 'executable'
assert_equal true, File.exist?(installed_exec)
assert_equal ( 0100755 & (~ File.umask)), File.stat(installed_exec).mode unless win_platform?
assert_equal mask, File.stat(installed_exec).mode unless win_platform?

wrapper = File.read installed_exec
assert_match %r|generated by RubyGems|, wrapper
Expand All @@ -323,7 +323,7 @@ def test_generate_bin_script_wrappers
@installer.generate_bin
assert_equal true, File.directory?(util_inst_bindir)
assert_equal true, File.exist?(installed_exec)
assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
assert_equal mask, File.stat(installed_exec).mode unless win_platform?

assert_match %r|generated by RubyGems|, File.read(installed_exec)

Expand Down Expand Up @@ -1014,5 +1014,9 @@ def util_execless
@installer = util_installer @spec, gem, @gemhome
end

def mask
0100755 & (~File.umask)
end

end

0 comments on commit 1ed75ec

Please sign in to comment.