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

Import RDoc 3.5.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-02-05 06:20:57 +00:00
parent d8ebf3829f
commit 8aa895294b
17 changed files with 564 additions and 290 deletions

View file

@ -17,16 +17,26 @@ class TestRDocOptions < MiniTest::Unit::TestCase
end
def test_check_files
skip "assumes UNIX permission model" if /mswin|mingw/ =~ RUBY_PLATFORM
out, err = capture_io do
Dir.mktmpdir do |dir|
Dir.chdir dir do
FileUtils.touch 'unreadable'
FileUtils.chmod 0, 'unreadable'
begin
unreadable = nil # variable for windows
@options.files = %w[nonexistent unreadable]
Dir.chdir dir do
if RUBY_PLATFORM =~ /mswin|mingw/ then
unreadable = open 'unreadable'
File.delete 'unreadable'
else
FileUtils.touch 'unreadable'
FileUtils.chmod 0, 'unreadable'
end
@options.check_files
@options.files = %w[nonexistent unreadable]
@options.check_files
end
ensure
unreadable.close if unreadable
end
end
end