require 'test/unit' require 'rdoc/markup' require 'rdoc/markup/to_html' class TestRdocMarkupToHtml < Test::Unit::TestCase def setup @am = RDoc::Markup::AttributeManager.new @th = RDoc::Markup::ToHtml.new end def test_tt_formatting assert_equal "

\n--(c) ©\n

\n", util_format("-- -- (c) (c)") assert_equal "

\n\n

\n", util_format("--") end def util_fragment(text) RDoc::Markup::Fragment.new 0, nil, nil, text end def util_format(text) fragment = util_fragment text @th.start_accepting @th.accept_paragraph @am, fragment @th.end_accepting end end