diff options
Diffstat (limited to 'test/rdoc/test_rdoc_markup_to_html_crossref.rb')
-rw-r--r-- | test/rdoc/test_rdoc_markup_to_html_crossref.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/rdoc/test_rdoc_markup_to_html_crossref.rb b/test/rdoc/test_rdoc_markup_to_html_crossref.rb index 73b76de4d9..63fc95ff51 100644 --- a/test/rdoc/test_rdoc_markup_to_html_crossref.rb +++ b/test/rdoc/test_rdoc_markup_to_html_crossref.rb @@ -59,7 +59,7 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase def test_convert_RDOCLINK_rdoc_ref_method result = @to.convert 'rdoc-ref:C1#m' - assert_equal para("<a href=\"C1.html#method-i-m\">#m</a>"), result + assert_equal para("<a href=\"C1.html#method-i-m\">C1#m</a>"), result end def test_convert_RDOCLINK_rdoc_ref_method_label @@ -75,13 +75,13 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase result = @to.convert 'rdoc-ref:C1#%' - assert_equal para("<a href=\"C1.html#method-i-25\">#%</a>"), result + assert_equal para("<a href=\"C1.html#method-i-25\">C1#%</a>"), result m.singleton = true result = @to.convert 'rdoc-ref:C1::%' - assert_equal para("<a href=\"C1.html#method-c-25\">::%</a>"), result + assert_equal para("<a href=\"C1.html#method-c-25\">C1::%</a>"), result end def test_convert_RDOCLINK_rdoc_ref_method_percent_label @@ -200,11 +200,16 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase def test_link assert_equal 'n', @to.link('n', 'n') - assert_equal '<a href="C1.html#method-c-m">::m</a>', @to.link('m', 'm') + assert_equal '<a href="C1.html#method-c-m">m</a>', @to.link('m', 'm') + end + + def test_link_for_method_traverse + @to = RDoc::Markup::ToHtmlCrossref.new @options, 'C2.html', @c9 + assert_equal '<a href="C9/A.html#method-i-foo">C9::B#foo</a>', @to.link('C9::B#foo', 'C9::B#foo') end def test_link_class_method_full - assert_equal '<a href="Parent.html#method-c-m">Parent.m</a>', + assert_equal '<a href="Parent.html#method-c-m">Parent::m</a>', @to.link('Parent::m', 'Parent::m') end |