mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Import RDoc r101.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0af4a490b4
commit
fd25f74d64
45 changed files with 6952 additions and 4397 deletions
30
test/rdoc/test_rdoc_markup_to_html.rb
Normal file
30
test/rdoc/test_rdoc_markup_to_html.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
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 "<p>\n<tt>--</tt> — <tt>(c)</tt> ©\n</p>\n",
|
||||
util_format("<tt>--</tt> -- <tt>(c)</tt> (c)")
|
||||
assert_equal "<p>\n<b>—</b>\n</p>\n", util_format("<b>--</b>")
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue