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 | 17 |
1 files changed, 17 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 fb0aca2909..5826f3d095 100644 --- a/test/rdoc/test_rdoc_markup_to_html_crossref.rb +++ b/test/rdoc/test_rdoc_markup_to_html_crossref.rb @@ -20,6 +20,9 @@ class RDocMarkupToHtmlCrossrefTest < XrefTestCase result = @to.convert '+C1+' assert_equal para("<a href=\"C1.html\"><code>C1</code></a>"), result + result = @to.convert 'Constant[rdoc-ref:C1]' + assert_equal para("<a href=\"C1.html\">Constant</a>"), result + result = @to.convert 'FOO' assert_equal para("FOO"), result @@ -30,6 +33,20 @@ class RDocMarkupToHtmlCrossrefTest < XrefTestCase assert_equal para("<code># :stopdoc:</code>:"), result end + def test_convert_CROSSREF_ignored_excluded_words + @options.autolink_excluded_words = ['C1'] + + result = @to.convert 'C1' + assert_equal para("C1"), result + + result = @to.convert '+C1+' + assert_equal para("<a href=\"C1.html\"><code>C1</code></a>"), result + + # Explicit linking with rdoc-ref is not ignored + result = @to.convert 'Constant[rdoc-ref:C1]' + assert_equal para("<a href=\"C1.html\">Constant</a>"), result + end + def test_convert_CROSSREF_method result = @to.convert 'C1#m(foo, bar, baz)' |