summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 16:36:44 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 16:36:44 +0000
commitf08d8f722f6338fa024c22b651c9e9078d85999d (patch)
tree7d9af26d98d3e43a1e06fe34597d0a2c125e1162 /test/ruby
parent22a852a8c0b960578d9e9846a2d11f8940a3f580 (diff)
merge revision(s) 53673: [Backport #12229]
* test/ruby/test_file.rb (TestFile#test_realpath_encoding): rescue Errno::EACCES and skip the testcase because it'll be raised on Windows always unless the runner doesn't have the administrator privilege. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_file.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index 88b934d8ef..f5a00f9e17 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -268,7 +268,11 @@ class TestFile < Test::Unit::TestCase
realdir = File.realpath(tmpdir)
open(File.join(tmpdir, tst), "w") {}
a = File.join(tmpdir, "x")
- File.symlink(tst, a)
+ begin
+ File.symlink(tst, a)
+ rescue Errno::EACCES
+ skip "need privilege"
+ end
assert_equal(File.join(realdir, tst), File.realpath(a))
File.unlink(a)