summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-27 12:00:07 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-27 12:00:07 +0000
commitcf3c1bfead41b0fc8bea3d0b03e7234bfbc8f5ad (patch)
tree708983d206a6110059f05f2aa8d2dcee3e4cf62c /test/ruby
parent63710b73b2c1077878e2ebc6d2126efe421ae3c0 (diff)
* 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/trunk@53673 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 88b934d..f5a00f9 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)