summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_markup_pre_process.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc/test_rdoc_markup_pre_process.rb')
-rw-r--r--test/rdoc/test_rdoc_markup_pre_process.rb21
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"