diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-28 00:33:08 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-28 00:33:08 +0000 |
commit | 4e53f3ad72d16ec251ba92233ce4757a3bc13618 (patch) | |
tree | 5795b83f4ca64ebee9a9f1586cfd6489eafce0e4 /test/rubygems/test_gem_installer.rb | |
parent | 7a3f794da0fbfacb99c0721271990d39c9885928 (diff) | |
download | ruby-4e53f3ad72d16ec251ba92233ce4757a3bc13618.tar.gz |
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.4.
Please see entries of 2.6.4 on
https://github.com/rubygems/rubygems/blob/master/History.txt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_installer.rb')
-rw-r--r-- | test/rubygems/test_gem_installer.rb | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index f9149650f0..dedb4c99ca 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -2,6 +2,20 @@ require 'rubygems/installer_test_case' class TestGemInstaller < Gem::InstallerTestCase + @@symlink_supported = nil + + def symlink_supported? + if @@symlink_supported.nil? + begin + File.symlink("", "") + rescue Errno::ENOENT, Errno::EEXIST + @@symlink_supported = true + rescue NotImplementedError, SystemCallError + @@symlink_supported = false + end + end + @@symlink_supported + end def setup super @@ -552,7 +566,7 @@ gem 'other', version end def test_generate_bin_symlink_update_older - return if win_platform? #Windows FS do not support symlinks + return if !symlink_supported? @installer.wrappers = false util_make_exec @@ -588,7 +602,7 @@ gem 'other', version end def test_generate_bin_symlink_update_remove_wrapper - return if win_platform? #Windows FS do not support symlinks + return if !symlink_supported? @installer.wrappers = true util_make_exec @@ -639,7 +653,12 @@ gem 'other', version installed_exec = File.join(util_inst_bindir, 'executable') assert_path_exists installed_exec - assert_match(/Unable to use symlinks on Windows, installing wrapper/i, + if symlink_supported? + assert_send([File, :symlink?, installed_exec]) + return + end + + assert_match(/Unable to use symlinks, installing wrapper/i, @ui.error) wrapper = File.read installed_exec @@ -651,7 +670,7 @@ gem 'other', version end def test_generate_bin_uses_default_shebang - return if win_platform? #Windows FS do not support symlinks + return if !symlink_supported? @installer.wrappers = true util_make_exec |