2012-11-27 08:28:14 +04:00
|
|
|
require 'rdoc/test_case'
|
|
|
|
|
|
|
|
class TestRDocMarkupHeading < RDoc::TestCase
|
|
|
|
|
|
|
|
def setup
|
|
|
|
super
|
|
|
|
|
|
|
|
@h = RDoc::Markup::Heading.new 1, 'Hello *Friend*!'
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_aref
|
|
|
|
assert_equal 'label-Hello+Friend%21', @h.aref
|
|
|
|
end
|
|
|
|
|
2013-09-19 03:33:36 +04:00
|
|
|
def test_label
|
|
|
|
assert_equal 'label-Hello+Friend%21', @h.label
|
|
|
|
assert_equal 'label-Hello+Friend%21', @h.label(nil)
|
|
|
|
|
|
|
|
context = RDoc::NormalClass.new 'Foo'
|
|
|
|
|
|
|
|
assert_equal 'class-Foo-label-Hello+Friend%21', @h.label(context)
|
|
|
|
end
|
|
|
|
|
2012-11-27 08:28:14 +04:00
|
|
|
def test_plain_html
|
|
|
|
assert_equal 'Hello <strong>Friend</strong>!', @h.plain_html
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|