diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-16 04:59:24 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-16 04:59:24 +0000 |
commit | b7528b5edb1f9148ea00ebb6151720e5943b3f0b (patch) | |
tree | 4caf55c53adb188170240f54b924892fbc5f9814 /test/rdoc/test_rdoc_markup_pre_process.rb | |
parent | 97ac172d58d695305c39d555155318edb99f1ea7 (diff) | |
download | ruby-b7528b5edb1f9148ea00ebb6151720e5943b3f0b.tar.gz |
* lib/rdoc.rb: Import RDoc 3.7 release candidate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_markup_pre_process.rb')
-rw-r--r-- | test/rdoc/test_rdoc_markup_pre_process.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_markup_pre_process.rb b/test/rdoc/test_rdoc_markup_pre_process.rb index 9fff53df77..db5fca5ac1 100644 --- a/test/rdoc/test_rdoc_markup_pre_process.rb +++ b/test/rdoc/test_rdoc_markup_pre_process.rb @@ -40,6 +40,11 @@ Regular expressions (<i>regexp</i>s) are patterns which describe the contents of a string. EXPECTED + # 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/ + assert_equal expected, content end @@ -59,6 +64,11 @@ contents of a string. expected = "?\n" + # 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/ + assert_equal expected, content end @@ -86,6 +96,17 @@ contents of a string. assert_equal "", text end + def test_handle_category + context = RDoc::Context.new + original_section = context.current_section + + text = "# :category: other\n" + + @pp.handle text, context + + refute_equal original_section, context.current_section + end + def test_handle_code_object cd = RDoc::CodeObject.new text = "# :x: y\n" |