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

* lib/rdoc/ri/driver.rb: Fixed ri page display for files with

extensions.
* test/rdoc/test_rdoc_ri_driver.rb:  Test for above


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2012-12-03 23:32:39 +00:00
parent f8f5a9eb4e
commit ec05ade531
3 changed files with 38 additions and 1 deletions

View file

@ -747,6 +747,25 @@ Foo::Bar#bother
assert_match %r%README\.md%, out
end
def test_display_page_extension
util_store
other = @store1.add_file 'README.EXT'
other.parser = RDoc::Parser::Simple
other.comment =
doc(
head(1, 'README.EXT'),
para('This is the other README'))
@store1.save_page other
out, = capture_io do
@driver.display_page 'home:README.EXT'
end
assert_match 'other README', out
end
def test_display_page_ignore_directory
util_store
@ -1147,6 +1166,14 @@ Foo::Bar#bother
assert_equal nil, meth, 'ruby page'
end
def test_parse_name_page_extenson
klass, type, meth = @driver.parse_name 'ruby:README.EXT'
assert_equal 'ruby', klass, 'ruby project'
assert_equal ':', type, 'ruby type'
assert_equal 'README.EXT', meth, 'ruby page'
end
def test_parse_name_single_class
klass, type, meth = @driver.parse_name 'Foo'