summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_package.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-11 21:29:32 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-11 21:29:32 +0000
commit10c5d6ee2593f5b6a0361009201464c248158da6 (patch)
treeffae8e3894c1e1a93a6293b17ab4b7633043d8e4 /test/rubygems/test_gem_package.rb
parent21c1e2da06c76e825feeeec9233c3e5a9f0345a0 (diff)
* lib/rubygems/commands/setup_command.rb: Don't delete non-rubygems
files when installing RubyGems. * test/rubygems/test_gem_commands_setup_command.rb: Test for the above. * lib/rubygems/ext/ext_conf_builder.rb: Use full path to siteconf.rb in case the extconf.rb changes directories (like memcached does). * lib/rubygems/package.rb: Remove double slash from path. * test/rubygems/test_gem_package.rb: Test for the above. * test/rubygems/test_gem_package_old.rb: ditto. * lib/rubygems/source.rb: Revert automatic HTTPS upgrade * lib/rubygems/spec_fetcher.rb: ditto. * test/rubygems/test_gem_remote_fetcher.rb: ditto. * test/rubygems/test_gem_source.rb: ditto. * test/rubygems/test_gem_spec_fetcher.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_package.rb')
-rw-r--r--test/rubygems/test_gem_package.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_package.rb b/test/rubygems/test_gem_package.rb
index 1e9603c6c7..87e7274051 100644
--- a/test/rubygems/test_gem_package.rb
+++ b/test/rubygems/test_gem_package.rb
@@ -18,6 +18,8 @@ class TestGemPackage < Gem::Package::TarTestCase
@gem = @spec.cache_file
@destination = File.join @tempdir, 'extract'
+
+ FileUtils.mkdir_p @destination
end
def test_class_new_old_format
@@ -330,6 +332,20 @@ class TestGemPackage < Gem::Package::TarTestCase
"#{@destination} is not allowed", e.message)
end
+ def test_install_location_extra_slash
+ package = Gem::Package.new @gem
+
+ file = 'foo//file.rb'
+ file.taint
+
+ destination = @destination.sub '/', '//'
+
+ destination = package.install_location file, destination
+
+ assert_equal File.join(@destination, 'foo', 'file.rb'), destination
+ refute destination.tainted?
+ end
+
def test_install_location_relative
package = Gem::Package.new @gem