# frozen_string_literal: false require 'rdoc/test_case' class TestRDocMarkupToHtml < RDoc::Markup::FormatterTestCase add_visitor_tests def setup super @to = RDoc::Markup::ToHtml.new @options end def accept_blank_line assert_empty @to.res.join end def accept_block_quote assert_equal "\n
\n

quote

\n
\n", @to.res.join end def accept_document assert_equal "\n

hello

\n", @to.res.join end def accept_heading links = ' ' + '' expected = "\n
Hello#{links}
\n" assert_equal expected, @to.res.join end def accept_heading_1 links = ' ' + '' assert_equal "\n

Hello#{links}

\n", @to.res.join end def accept_heading_2 links = ' ' + '' assert_equal "\n

Hello#{links}

\n", @to.res.join end def accept_heading_3 links = ' ' + '' assert_equal "\n

Hello#{links}

\n", @to.res.join end def accept_heading_4 links = ' ' + '' assert_equal "\n

Hello#{links}

\n", @to.res.join end def accept_heading_b links = ' ' + '' inner = "Hello" assert_equal "\n

#{inner}#{links}

\n", @to.res.join end def accept_heading_suppressed_crossref links = ' ' + '' assert_equal "\n

Hello#{links}

\n", @to.res.join end def accept_list_end_bullet assert_equal [], @to.list assert_equal [], @to.in_list_entry assert_equal "\n", @to.res.join end def accept_list_end_label assert_equal [], @to.list assert_equal [], @to.in_list_entry assert_equal "
\n", @to.res.join end def accept_list_end_lalpha assert_equal [], @to.list assert_equal [], @to.in_list_entry assert_equal "
    \n", @to.res.join end def accept_list_end_number assert_equal [], @to.list assert_equal [], @to.in_list_entry assert_equal "
      \n", @to.res.join end def accept_list_end_note assert_equal [], @to.list assert_equal [], @to.in_list_entry assert_equal "
      \n", @to.res.join end def accept_list_end_ualpha assert_equal [], @to.list assert_equal [], @to.in_list_entry assert_equal "
        \n", @to.res.join end def accept_list_item_end_bullet assert_equal %w[], @to.in_list_entry end def accept_list_item_end_label assert_equal %w[], @to.in_list_entry end def accept_list_item_end_lalpha assert_equal %w[], @to.in_list_entry end def accept_list_item_end_note assert_equal %w[], @to.in_list_entry end def accept_list_item_end_number assert_equal %w[], @to.in_list_entry end def accept_list_item_end_ualpha assert_equal %w[], @to.in_list_entry end def accept_list_item_start_bullet assert_equal "