aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc/test_rdoc_markup_to_markdown.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-16 23:07:49 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-16 23:07:49 +0000
commit810008293fd8ce3a9d3d62dcf2f2229b98c2bd49 (patch)
tree7e06c2b0a08a3b29bf6a1c1cfd44a352fb2d82e2 /test/rdoc/test_rdoc_markup_to_markdown.rb
parent10295ab2ff87b1189dcbe129a07a692417db53f6 (diff)
downloadruby-810008293fd8ce3a9d3d62dcf2f2229b98c2bd49.tar.gz
* lib/rdoc.rb: Updated VERSION.
* lib/rdoc/markup/attribute_manager.rb: Removed useless empty check. * lib/rdoc/markup/to_markdown.rb: Support links from other formats. * lib/rdoc/markup/formatter.rb: ditto. * lib/rdoc/markup/to_html.rb: ditto. * test/rdoc/test_rdoc_markup_formatter.rb: Test for above. * test/rdoc/test_rdoc_markup_to_html.rb: ditto. * test/rdoc/test_rdoc_markup_to_markdown.rb: ditto. * lib/rdoc/rd/block_parser.rb: Improved footnote display. Worked around bug in footnote conversion to Markdown. * test/rdoc/test_rdoc_rd_block_parser.rb: Test for above. * lib/rdoc/rd/inline_parser.rb: Fixed bug with emphasis inside verbatim. * test/rdoc/test_rdoc_rd_inline_parser.rb: Test for above. * test/rdoc/test_rdoc_parser_rd.rb: Use mu_pp, use shortcut methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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