diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-28 02:28:25 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-28 02:28:25 +0000 |
commit | 84ece951630c61eddab8be47b80fc1a7f774175f (patch) | |
tree | c843f17ba485f0263f39d797d8a3b1517d1ddb8b /test/rdoc | |
parent | 41ab31e67a747e5db91a7ef4502a54cdf0525163 (diff) | |
download | ruby-84ece951630c61eddab8be47b80fc1a7f774175f.tar.gz |
* lib/rdoc: Update to RDoc 3.7 (final)
* NEWS: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc')
-rw-r--r-- | test/rdoc/test_rdoc_markup.rb | 31 | ||||
-rw-r--r-- | test/rdoc/test_rdoc_markup_document.rb | 6 | ||||
-rw-r--r-- | test/rdoc/test_rdoc_markup_pre_process.rb | 4 |
3 files changed, 39 insertions, 2 deletions
diff --git a/test/rdoc/test_rdoc_markup.rb b/test/rdoc/test_rdoc_markup.rb index 48683dbcda..ae6c11e7da 100644 --- a/test/rdoc/test_rdoc_markup.rb +++ b/test/rdoc/test_rdoc_markup.rb @@ -56,5 +56,36 @@ the time assert_equal expected, out end + def test_convert_document + doc = RDoc::Markup::Parser.parse <<-STR +now is +the time + + hello + dave + +1. l1 +2. l2 + STR + + m = RDoc::Markup.new + + tt = RDoc::Markup::ToTest.new m + + out = m.convert doc, tt + + expected = [ + "now is the time", + "\n", + " hello\n dave\n", + "1: ", + "l1", + "1: ", + "l2", + ] + + assert_equal expected, out + end + end diff --git a/test/rdoc/test_rdoc_markup_document.rb b/test/rdoc/test_rdoc_markup_document.rb index 70fb3efb16..6b4b5892ab 100644 --- a/test/rdoc/test_rdoc_markup_document.rb +++ b/test/rdoc/test_rdoc_markup_document.rb @@ -55,6 +55,12 @@ class TestRDocMarkupDocument < MiniTest::Unit::TestCase refute_empty @d end + def test_empty_eh_document + d = @RM::Document.new @d + + assert_empty d + end + def test_equals2 d2 = @RM::Document.new diff --git a/test/rdoc/test_rdoc_markup_pre_process.rb b/test/rdoc/test_rdoc_markup_pre_process.rb index db5fca5ac1..587a680f28 100644 --- a/test/rdoc/test_rdoc_markup_pre_process.rb +++ b/test/rdoc/test_rdoc_markup_pre_process.rb @@ -43,7 +43,7 @@ contents of a string. # FIXME 1.9 fix on windoze # preprocessor uses binread, so line endings are \r\n expected.gsub!("\n", "\r\n") if - RUBY_VERSION =~ /^1.9/ && RUBY_PLATFORM =~ /mswin|mingw/ + RUBY_VERSION < "1.9.3" && RUBY_PLATFORM =~ /mswin|mingw/ assert_equal expected, content end @@ -67,7 +67,7 @@ contents of a string. # FIXME 1.9 fix on windoze # preprocessor uses binread, so line endings are \r\n expected.gsub!("\n", "\r\n") if - RUBY_VERSION =~ /^1.9/ && RUBY_PLATFORM =~ /mswin|mingw/ + RUBY_VERSION < "1.9.3" && RUBY_PLATFORM =~ /mswin|mingw/ assert_equal expected, content end |