1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Import RDoc 3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2010-12-20 03:22:49 +00:00
parent d7effd506f
commit 2ef9c50c6e
106 changed files with 8878 additions and 4179 deletions

View file

@ -14,12 +14,11 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase
end
def assert_ref(path, ref)
assert_equal "<p>\n<a href=\"#{path}\">#{ref}</a>\n</p>\n",
@xref.convert(ref)
assert_equal "\n<p><a href=\"#{path}\">#{ref}</a></p>\n", @xref.convert(ref)
end
def refute_ref(body, ref)
assert_equal "<p>\n#{body}\n</p>\n", @xref.convert(ref)
assert_equal "\n<p>#{body}</p>\n", @xref.convert(ref)
end
def test_handle_special_CROSSREF_C2
@ -108,16 +107,16 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase
assert_ref 'C1.html#method-c-m', '::m'
assert_ref 'C1.html#method-i-m', 'C1#m'
assert_ref 'C1.html#method-i-m', 'C1.m'
assert_ref 'C1.html#method-c-m', 'C1.m'
assert_ref 'C1.html#method-c-m', 'C1::m'
assert_ref 'C1.html#method-i-m', 'C1#m'
assert_ref 'C1.html#method-i-m', 'C1#m()'
assert_ref 'C1.html#method-i-m', 'C1#m(*)'
assert_ref 'C1.html#method-i-m', 'C1.m'
assert_ref 'C1.html#method-i-m', 'C1.m()'
assert_ref 'C1.html#method-i-m', 'C1.m(*)'
assert_ref 'C1.html#method-c-m', 'C1.m'
assert_ref 'C1.html#method-c-m', 'C1.m()'
assert_ref 'C1.html#method-c-m', 'C1.m(*)'
assert_ref 'C1.html#method-c-m', 'C1::m'
assert_ref 'C1.html#method-c-m', 'C1::m()'
@ -127,7 +126,8 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase
assert_ref 'C2/C3.html#method-i-m', 'C2::C3.m'
assert_ref 'C2/C3/H1.html#method-i-m%3F', 'C2::C3::H1#m?'
# TODO stop escaping - HTML5 allows anything but space
assert_ref 'C2/C3/H1.html#method-i-m-3F', 'C2::C3::H1#m?'
assert_ref 'C2/C3.html#method-i-m', '::C2::C3#m'
assert_ref 'C2/C3.html#method-i-m', '::C2::C3#m()'
@ -153,8 +153,15 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase
refute_ref '::C3::H1#n', '\::C3::H1#n'
end
def test_handle_special_CROSSREF_show_hash_false
@xref.show_hash = false
assert_equal "\n<p><a href=\"C1.html#method-i-m\">m</a></p>\n",
@xref.convert('#m')
end
def test_handle_special_CROSSREF_special
assert_equal "<p>\n<a href=\"C2/C3.html\">C2::C3</a>;method(*)\n</p>\n",
assert_equal "\n<p><a href=\"C2/C3.html\">C2::C3</a>;method(*)</p>\n",
@xref.convert('C2::C3;method(*)')
end