diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-25 02:43:03 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-25 02:43:03 +0000 |
commit | 858362e761a41e7d96efbcb9b38ae815b1e388d7 (patch) | |
tree | b47a0968d921320591f9218bc746e11a7922c53f /test/rdoc/test_rdoc_markup_to_html.rb | |
parent | 00b4a3f9c4aaf5aa038a9530ec515e1718ae1c42 (diff) | |
download | ruby-858362e761a41e7d96efbcb9b38ae815b1e388d7.tar.gz |
Import RDoc 2.2.1 r185
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_markup_to_html.rb')
-rw-r--r-- | test/rdoc/test_rdoc_markup_to_html.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/test/rdoc/test_rdoc_markup_to_html.rb b/test/rdoc/test_rdoc_markup_to_html.rb index 463228cc4a..05fb9f2375 100644 --- a/test/rdoc/test_rdoc_markup_to_html.rb +++ b/test/rdoc/test_rdoc_markup_to_html.rb @@ -2,7 +2,7 @@ require 'test/unit' require 'rdoc/markup' require 'rdoc/markup/to_html' -class TestRdocMarkupToHtml < Test::Unit::TestCase +class TestRDocMarkupToHtml < Test::Unit::TestCase def setup @am = RDoc::Markup::AttributeManager.new @@ -10,11 +10,23 @@ class TestRdocMarkupToHtml < Test::Unit::TestCase end def test_tt_formatting - assert_equal "<p>\n<tt>--</tt> — <tt>(c)</tt> ©\n</p>\n", - util_format("<tt>--</tt> -- <tt>(c)</tt> (c)") + assert_equal "<p>\n<tt>--</tt> — <tt>cats'</tt> cats’\n</p>\n", + util_format("<tt>--</tt> -- <tt>cats'</tt> cats'") assert_equal "<p>\n<b>—</b>\n</p>\n", util_format("<b>--</b>") end + def test_convert_string_fancy + # + # The HTML typesetting is broken in a number of ways, but I have fixed + # the most glaring issues for single and double quotes. Note that + # "strange" symbols (periods or dashes) need to be at the end of the + # test case strings in order to suppress cross-references. + # + assert_equal "<p>\n“cats”.\n</p>\n", util_format("\"cats\".") + assert_equal "<p>\n‘cats’.\n</p>\n", util_format("\'cats\'.") + assert_equal "<p>\ncat’s-\n</p>\n", util_format("cat\'s-") + end + def util_fragment(text) RDoc::Markup::Fragment.new 0, nil, nil, text end |