mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/test_find.rb (TestFind#test_unsearchable_dir): ruby cannot make
directory unreachable by owner on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4e12ff9225
commit
d0a9ee1e86
2 changed files with 6 additions and 1 deletions
|
@ -130,13 +130,13 @@ class TestFind < Test::Unit::TestCase
|
|||
Find.find(d, ignore_error: true) {|f| a << f }
|
||||
assert_equal([d, dir, file], a)
|
||||
|
||||
skip "no meaning test on Windows" if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
a = []
|
||||
assert_raise_with_message(Errno::EACCES, /#{Regexp.quote(file)}/) do
|
||||
Find.find(d, ignore_error: false) {|f| a << f }
|
||||
end
|
||||
assert_equal([d, dir, file], a)
|
||||
|
||||
skip "no meaning test on Windows" if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
assert_raise(Errno::EACCES) { File.lstat(file) }
|
||||
ensure
|
||||
File.chmod(0700, dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue