diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-12-31 23:57:09 +0900 |
---|---|---|
committer | git <[email protected]> | 2023-12-31 15:19:50 +0000 |
commit | 569a06aa2fbaec3febc5de975654cba8f85813f1 (patch) | |
tree | 696fb91053c4593013323b660fbfd5bdf87bbf00 /test/rdoc/test_rdoc_markup_to_html_crossref.rb | |
parent | b4adc1bbab5fc69186b3f3046c90c0e935fdc841 (diff) |
[ruby/rdoc] Allow empty name rdoc-ref as a local link
https://github.com/ruby/rdoc/commit/914a6af137
Diffstat (limited to 'test/rdoc/test_rdoc_markup_to_html_crossref.rb')
-rw-r--r-- | test/rdoc/test_rdoc_markup_to_html_crossref.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_markup_to_html_crossref.rb b/test/rdoc/test_rdoc_markup_to_html_crossref.rb index 4b87dd5da5..dc4488195a 100644 --- a/test/rdoc/test_rdoc_markup_to_html_crossref.rb +++ b/test/rdoc/test_rdoc_markup_to_html_crossref.rb @@ -133,6 +133,18 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase 'rdoc-ref:C1@foo' end + def test_convert_RDOCLINK_rdoc_ref_label_in_current_file + result = @to.convert 'rdoc-ref:@foo' + + assert_equal para("<a href=\"#label-foo\">foo</a>"), result, + 'rdoc-ref:@foo' + + result = @to.convert '{Foo}[rdoc-ref:@foo]' + + assert_equal para("<a href=\"#label-foo\">Foo</a>"), result, + '{Foo}[rdoc-ref:@foo]' + end + def test_gen_url assert_equal '<a href="C1.html">Some class</a>', @to.gen_url('rdoc-ref:C1', 'Some class') |