aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc/test_rdoc_markup_formatter.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-18 23:33:36 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-18 23:33:36 +0000
commitdf7dac9174a31e71b58be6184e23bfe6b742a494 (patch)
tree885edf624f0e8f37014b0d937340ac1c372a0066 /test/rdoc/test_rdoc_markup_formatter.rb
parentfed428007c015ac3b7f4586f2491517fafffa030 (diff)
downloadruby-df7dac9174a31e71b58be6184e23bfe6b742a494.tar.gz
* lib/rdoc: Update to RDoc 4.1.0.preview.1
RDoc 4.1.0 contains a number of enhancements including a new default style and accessibility support. You can see the changelog here: https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc * test/rdoc: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_markup_formatter.rb')
-rw-r--r--test/rdoc/test_rdoc_markup_formatter.rb32
1 files changed, 29 insertions, 3 deletions
diff --git a/test/rdoc/test_rdoc_markup_formatter.rb b/test/rdoc/test_rdoc_markup_formatter.rb
index c0dde757cb..d01a42fca6 100644
--- a/test/rdoc/test_rdoc_markup_formatter.rb
+++ b/test/rdoc/test_rdoc_markup_formatter.rb
@@ -71,20 +71,46 @@ class TestRDocMarkupFormatter < RDoc::TestCase
@to.add_special_RDOCLINK
assert_includes special_names, 'RDOCLINK'
+
+ def @to.handle_special_RDOCLINK special
+ "<#{special.text}>"
+ end
+
+ document = doc(para('{foo}[rdoc-label:bar].'))
+
+ formatted = document.accept @to
+
+ assert_equal '{foo}[<rdoc-label:bar>].', formatted
end
def test_add_special_TIDYLINK
@to.add_special_TIDYLINK
assert_includes special_names, 'TIDYLINK'
+
+ def @to.handle_special_TIDYLINK special
+ "<#{special.text}>"
+ end
+
+ document = doc(para('foo[rdoc-label:bar].'))
+
+ formatted = document.accept @to
+
+ assert_equal '<foo[rdoc-label:bar]>.', formatted
+
+ document = doc(para('{foo}[rdoc-label:bar].'))
+
+ formatted = document.accept @to
+
+ assert_equal '<{foo}[rdoc-label:bar]>.', formatted
end
def test_parse_url
scheme, url, id = @to.parse_url 'example/foo'
- assert_equal 'http', scheme
- assert_equal 'http://example/foo', url
- assert_equal nil, id
+ assert_equal 'http', scheme
+ assert_equal 'example/foo', url
+ assert_equal nil, id
end
def test_parse_url_anchor