diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/rdoc/test_rdoc_markup_to_html_crossref.rb | 17 | ||||
| -rw-r--r-- | test/rdoc/test_rdoc_options.rb | 1 |
2 files changed, 18 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)' diff --git a/test/rdoc/test_rdoc_options.rb b/test/rdoc/test_rdoc_options.rb index e658d4b314..9fc6830239 100644 --- a/test/rdoc/test_rdoc_options.rb +++ b/test/rdoc/test_rdoc_options.rb @@ -86,6 +86,7 @@ class TestRDocOptions < RDoc::TestCase 'webcvs' => nil, 'skip_tests' => true, 'apply_default_exclude' => true, + 'autolink_excluded_words' => [], } assert_equal expected, coder |
