diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/rdoc/test_rdoc_markup_to_html_crossref.rb | 5 | ||||
-rw-r--r-- | test/rdoc/test_rdoc_store.rb | 2 | ||||
-rw-r--r-- | test/rdoc/xref_test_case.rb | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_markup_to_html_crossref.rb b/test/rdoc/test_rdoc_markup_to_html_crossref.rb index 3d80980791..bac2569f87 100644 --- a/test/rdoc/test_rdoc_markup_to_html_crossref.rb +++ b/test/rdoc/test_rdoc_markup_to_html_crossref.rb @@ -26,6 +26,11 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase result end + def test_convert_CROSSREF_label_for_md + result = @to.convert 'EXAMPLE@foo' + assert_equal para("<a href=\"EXAMPLE_md.html#label-foo\">foo at <code>EXAMPLE</code></a>"), result + end + def test_convert_CROSSREF_label_period result = @to.convert 'C1@foo.' assert_equal para("<a href=\"C1.html#class-C1-label-foo\">foo at <code>C1</code></a>."), result diff --git a/test/rdoc/test_rdoc_store.rb b/test/rdoc/test_rdoc_store.rb index 5a884c0b5f..8332d9233e 100644 --- a/test/rdoc/test_rdoc_store.rb +++ b/test/rdoc/test_rdoc_store.rb @@ -172,7 +172,7 @@ class TestRDocStore < XrefTestCase end def test_all_files - assert_equal %w[xref_data.rb], + assert_equal %w[EXAMPLE.md xref_data.rb], @store.all_files.map { |m| m.full_name }.sort end diff --git a/test/rdoc/xref_test_case.rb b/test/rdoc/xref_test_case.rb index d42cf398e7..061c5bda49 100644 --- a/test/rdoc/xref_test_case.rb +++ b/test/rdoc/xref_test_case.rb @@ -22,8 +22,13 @@ class XrefTestCase < RDoc::TestCase parser = RDoc::Parser::Ruby.new @xref_data, @file_name, XREF_DATA, @options, stats + + @example_md = @store.add_file 'EXAMPLE.md' + @example_md.parser = RDoc::Parser::Markdown + @top_levels = [] @top_levels.push parser.scan + @top_levels.push @example_md generator = Object.new def generator.class_dir() nil end |