cat | \n",
@to.res.join
end
def accept_list_item_start_note_2
expected = <<-EXPECTED
teletype |
teletype description
|
EXPECTED
assert_equal expected, @to.res.join
end
def accept_list_item_start_number
assert_equal "- ", @to.res.join
end
def accept_list_item_start_ualpha
assert_equal "
- ", @to.res.join
end
def accept_list_start_bullet
assert_equal [:BULLET], @to.list
assert_equal [false], @to.in_list_entry
assert_equal "
", @to.res.join
end
def accept_list_start_label
assert_equal [:LABEL], @to.list
assert_equal [false], @to.in_list_entry
assert_equal "", @to.res.join
end
def accept_list_start_lalpha
assert_equal [:LALPHA], @to.list
assert_equal [false], @to.in_list_entry
assert_equal "", @to.res.join
end
def accept_list_start_note
assert_equal [:NOTE], @to.list
assert_equal [false], @to.in_list_entry
assert_equal "", @to.res.join
end
def accept_list_start_number
assert_equal [:NUMBER], @to.list
assert_equal [false], @to.in_list_entry
assert_equal "", @to.res.join
end
def accept_list_start_ualpha
assert_equal [:UALPHA], @to.list
assert_equal [false], @to.in_list_entry
assert_equal "", @to.res.join
end
def accept_paragraph
assert_equal "\nhi \n", @to.res.join
end
def accept_paragraph_b
assert_equal "\nreg bold words reg \n", @to.res.join
end
def accept_paragraph_i
assert_equal "\nreg italic words reg \n", @to.res.join
end
def accept_paragraph_plus
assert_equal "\nreg teletype reg \n", @to.res.join
end
def accept_paragraph_star
assert_equal "\nreg bold reg \n", @to.res.join
end
def accept_paragraph_underscore
assert_equal "\nreg italic reg \n", @to.res.join
end
def accept_raw
raw = <<-RAW.rstrip
RAW
assert_equal raw, @to.res.join
end
def accept_rule
assert_equal " \n", @to.res.join
end
def accept_verbatim
assert_equal "\nhi\n world \n", @to.res.join
end
def end_accepting
assert_equal 'hi', @to.end_accepting
end
def start_accepting
assert_equal [], @to.res
assert_equal [], @to.in_list_entry
assert_equal [], @to.list
end
def list_nested
expected = <<-EXPECTED
EXPECTED
assert_equal expected, @to.res.join
end
def list_verbatim
expected = <<-EXPECTED
EXPECTED
assert_equal expected, @to.end_accepting
end
def test_convert_string
assert_equal '<>', @to.convert_string('<>')
end
def test_list_verbatim_2
str = "* one\n verb1\n verb2\n* two\n"
expected = <<-EXPECTED
EXPECTED
assert_equal expected, @m.convert(str, @to)
end
def test_to_html
assert_equal "\n-- \n", util_format("--")
end
def util_format text
paragraph = RDoc::Markup::Paragraph.new text
@to.start_accepting
@to.accept_paragraph paragraph
@to.end_accepting
end
end
|