1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Upgrade to RDoc 3.5.3. Fixes [Bug #4376]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-02-07 07:07:12 +00:00
parent ca9f7009db
commit 60f2c9cf5b
11 changed files with 204 additions and 34 deletions

View file

@ -1,3 +1,5 @@
# coding: utf-8
require 'tempfile'
require 'rubygems'
require 'minitest/autorun'
@ -46,6 +48,30 @@ contents of a string.
assert_equal expected, content
end
def test_include_file_encoding_incompatible
skip "Encoding not implemented" unless Object.const_defined? :Encoding
@tempfile.write <<-INCLUDE
# -*- mode: rdoc; coding: utf-8; fill-column: 74; -*-
π
INCLUDE
@tempfile.flush
@tempfile.rewind
content = @pp.include_file @file_name, '', Encoding::US_ASCII
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
def test_handle
text = "# :x: y\n"
out = @pp.handle text