diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-05 22:20:15 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-05 22:20:15 +0000 |
commit | 54c40f3db59d6875de0c2c0f47ab7edce0bd3f43 (patch) | |
tree | 6dc4fc7137f7d98e84fe01b7270ab08a2f22718f /test/rdoc/test_rdoc_markup_document.rb | |
parent | fe6b2e20e9f17ed2c2900aa72994e075ffdc7124 (diff) |
* 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
Diffstat (limited to 'test/rdoc/test_rdoc_markup_document.rb')
-rw-r--r-- | test/rdoc/test_rdoc_markup_document.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_markup_document.rb b/test/rdoc/test_rdoc_markup_document.rb index 564434dfe6..0ab87280eb 100644 --- a/test/rdoc/test_rdoc_markup_document.rb +++ b/test/rdoc/test_rdoc_markup_document.rb @@ -191,5 +191,24 @@ class TestRDocMarkupDocument < RDoc::TestCase assert_equal expected, doc.table_of_contents end + def test_table_of_contents_omit_headings_below + document = doc( + head(1, 'A'), + para('B'), + head(2, 'C'), + para('D'), + head(1, 'E'), + para('F')) + + document.omit_headings_below = 1 + + expected = [ + head(1, 'A'), + head(1, 'E'), + ] + + assert_equal expected, document.table_of_contents + end + end |