mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc*: Improved display of ChangeLog files as HTML.
* test/rdoc*: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fe6b2e20e9
commit
54c40f3db5
9 changed files with 136 additions and 14 deletions
|
|
@ -91,5 +91,36 @@ class TestRDocMarkupToTableOfContents < RDoc::Markup::FormatterTestCase
|
|||
alias list_verbatim empty
|
||||
alias start_accepting empty
|
||||
|
||||
def test_accept_document_omit_headings_below
|
||||
document = doc
|
||||
document.omit_headings_below = 2
|
||||
|
||||
@to.accept_document document
|
||||
|
||||
assert_equal 2, @to.omit_headings_below
|
||||
end
|
||||
|
||||
def test_accept_heading_suppressed
|
||||
@to.start_accepting
|
||||
@to.omit_headings_below = 4
|
||||
|
||||
suppressed = head 5, 'Hello'
|
||||
|
||||
@to.accept_heading suppressed
|
||||
|
||||
assert_empty @to.res
|
||||
end
|
||||
|
||||
def test_suppressed_eh
|
||||
@to.omit_headings_below = nil
|
||||
|
||||
refute @to.suppressed? head(1, '')
|
||||
|
||||
@to.omit_headings_below = 1
|
||||
|
||||
refute @to.suppressed? head(1, '')
|
||||
assert @to.suppressed? head(2, '')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue