1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_pathname.rb: skip EACCES

* test/pathname/test_pathname.rb (test_realpath): skip EACCES if
  changing mode of a directory may have no effect.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-08-26 14:49:07 +00:00
parent 91f5ee89ef
commit 499120ad6e

View file

@ -401,6 +401,7 @@ class TestPathname < Test::Unit::TestCase
File.symlink("f/g", "h")
assert_equal("#{dir}/f/g", realpath("h"))
File.chmod(0000, "f")
next if File.readable?("f")
assert_raise(Errno::EACCES) { realpath("h") }
File.chmod(0755, "f")
}