summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_markup_to_markdown.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc/test_rdoc_markup_to_markdown.rb')
-rw-r--r--test/rdoc/test_rdoc_markup_to_markdown.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_markup_to_markdown.rb b/test/rdoc/test_rdoc_markup_to_markdown.rb
index 56f84b41db..6d09ca62ea 100644
--- a/test/rdoc/test_rdoc_markup_to_markdown.rb
+++ b/test/rdoc/test_rdoc_markup_to_markdown.rb
@@ -348,5 +348,36 @@ words words words words
assert_equal expected, @to.end_accepting
end
+ def test_convert_RDOCLINK
+ result = @to.convert 'rdoc-garbage:C'
+
+ assert_equal "C\n", result
+ end
+
+ def test_convert_TIDYLINK
+ result = @to.convert \
+ '{DSL}[http://en.wikipedia.org/wiki/Domain-specific_language]'
+
+ expected = "[DSL](http://en.wikipedia.org/wiki/Domain-specific_language)\n"
+
+ assert_equal expected, result
+ end
+
+ def test_handle_rdoc_link_label_footmark
+ assert_equal '[^1]:', @to.handle_rdoc_link('rdoc-label:footmark-1:x')
+ end
+
+ def test_handle_rdoc_link_label_foottext
+ assert_equal '[^1]', @to.handle_rdoc_link('rdoc-label:foottext-1:x')
+ end
+
+ def test_handle_rdoc_link_label_label
+ assert_equal '[x](#label-x)', @to.handle_rdoc_link('rdoc-label:label-x')
+ end
+
+ def test_handle_rdoc_link_ref
+ assert_equal 'x', @to.handle_rdoc_link('rdoc-ref:x')
+ end
+
end