* 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
This commit is contained in:
usa 2016-01-27 12:00:07 +00:00
Родитель 63710b73b2
Коммит cf3c1bfead
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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)