summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_markup_to_html_crossref.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 01:30:18 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 01:30:18 +0000
commit95e213d3542034e0fd2613de6990a7ddfe5718ca (patch)
tree76ec64fccb338dbcbc4d3f07c2f494ef9b7fe1ff /test/rdoc/test_rdoc_markup_to_html_crossref.rb
parent41fb243684f60e231fc77ec54752fe4e844523d5 (diff)
downloadruby-95e213d3542034e0fd2613de6990a7ddfe5718ca.tar.gz
Merge rdoc-6.1.0.beta1.
* https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_markup_to_html_crossref.rb')
-rw-r--r--test/rdoc/test_rdoc_markup_to_html_crossref.rb15
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