From cf3c1bfead41b0fc8bea3d0b03e7234bfbc8f5ad Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 27 Jan 2016 12:00:07 +0000 Subject: [PATCH] * 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 --- test/ruby/test_file.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)