diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-28 01:24:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-28 01:24:36 +0000 |
commit | 5dfc455b72707c6e9150b92056d2607a16918f65 (patch) | |
tree | 47b505047015fadfe71bf02bce0ba96bd14d3dad /test/ruby/test_rubyoptions.rb | |
parent | 868c98dccfb433772546e9abba935e0625ef310b (diff) | |
download | ruby-5dfc455b72707c6e9150b92056d2607a16918f65.tar.gz |
test: File.symlink needs administrator privilege
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index ef9a8f257e..efdaeed237 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -437,10 +437,14 @@ class TestRubyOptions < Test::Unit::TestCase } if File.respond_to? :symlink n2 = File.join(d, 't2') - File.symlink(n1, n2) - IO.popen([ruby, n2]) {|f| - assert_equal(n2, f.read) - } + begin + File.symlink(n1, n2) + rescue Errno::EACCES + else + IO.popen([ruby, n2]) {|f| + assert_equal(n2, f.read) + } + end end Dir.chdir(d) { n3 = '-e' |