diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-20 03:22:49 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-20 03:22:49 +0000 |
commit | 2ef9c50c6e405717d06362787c4549ca4f1c6485 (patch) | |
tree | ee99486567461dd5796f3d6edcc9e204187f2666 /test/rdoc/test_rdoc_markup_pre_process.rb | |
parent | d7effd506f5b91a636f2e6452ef1946b923007c7 (diff) | |
download | ruby-2ef9c50c6e405717d06362787c4549ca4f1c6485.tar.gz |
Import RDoc 3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30249 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 | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/rdoc/test_rdoc_markup_pre_process.rb b/test/rdoc/test_rdoc_markup_pre_process.rb index cae4da9e05..b4db512ce3 100644 --- a/test/rdoc/test_rdoc_markup_pre_process.rb +++ b/test/rdoc/test_rdoc_markup_pre_process.rb @@ -1,7 +1,7 @@ require 'tempfile' require 'rubygems' require 'minitest/autorun' -require 'rdoc/markup/preprocess' +require 'rdoc/markup/pre_process' require 'rdoc/code_objects' class TestRDocMarkupPreProcess < MiniTest::Unit::TestCase @@ -10,8 +10,7 @@ class TestRDocMarkupPreProcess < MiniTest::Unit::TestCase RDoc::Markup::PreProcess.registered.clear @tempfile = Tempfile.new 'test_rdoc_markup_pre_process' - @tempfile.binmode - @name = File.basename @tempfile.path + @file_name = File.basename @tempfile.path @dir = File.dirname @tempfile.path @pp = RDoc::Markup::PreProcess.new __FILE__, [@dir] @@ -32,13 +31,18 @@ contents of a string. @tempfile.flush @tempfile.rewind - content = @pp.include_file @name, '' + content = @pp.include_file @file_name, '', nil expected = <<-EXPECTED 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 |