From fcbf63e62c627deae76c1b8cb8c0876c536ed811 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 16 Mar 2020 18:49:26 +0900 Subject: Fresh start --- jni/ruby/test/rdoc/test_rdoc_markup_to_html.rb | 663 +++++++++++++++++++++++++ 1 file changed, 663 insertions(+) create mode 100644 jni/ruby/test/rdoc/test_rdoc_markup_to_html.rb (limited to 'jni/ruby/test/rdoc/test_rdoc_markup_to_html.rb') diff --git a/jni/ruby/test/rdoc/test_rdoc_markup_to_html.rb b/jni/ruby/test/rdoc/test_rdoc_markup_to_html.rb new file mode 100644 index 0000000..1e4b84f --- /dev/null +++ b/jni/ruby/test/rdoc/test_rdoc_markup_to_html.rb @@ -0,0 +1,663 @@ +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 "