summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-04-14 19:33:45 +0900
committeraycabta <aycabta@gmail.com>2020-05-24 23:47:24 +0900
commitf52a4690f8fbd495e8517178a0bf95c69ccea47c (patch)
treed0a909f81c7078513afd922946405a2380c427ed /test/rdoc
parentc79f9ea606d072176533b22813653f9fd26940af (diff)
[ruby/rdoc] Process crossref before tidylink
The crossref must be linked before tidylink because Klass.method[:sym] will be processed as a tidylink first and will be broken. https://github.com/ruby/rdoc/commit/0f47baf6d2
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_markup_to_html_crossref.rb7
1 files changed, 7 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 70306c683d..f6fabfb7db 100644
--- a/test/rdoc/test_rdoc_markup_to_html_crossref.rb
+++ b/test/rdoc/test_rdoc_markup_to_html_crossref.rb
@@ -151,6 +151,13 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase
REGEXP_HANDLING('#m')
end
+ def test_handle_regexp_CROSSREF_with_arg_looks_like_TIDYLINK
+ result = @to.convert 'C1.m[:sym]'
+
+ assert_equal para("<a href=\"C1.html#method-c-m\"><code>C1.m[:sym]</code></a>"), result,
+ 'C1.m[:sym]'
+ end
+
def test_handle_regexp_HYPERLINK_rdoc
readme = @store.add_file 'README.txt'
readme.parser = RDoc::Parser::Simple