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

* lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(313287)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2014-09-05 01:41:25 +00:00
parent 670c6e8ce9
commit d42d6e690e
56 changed files with 1597 additions and 223 deletions

View file

@ -131,6 +131,23 @@ class TestRDocEncoding < RDoc::TestCase
assert_equal "hi everybody", content, bug3360
end
def test_class_read_file_encoding_iso_2022_jp
skip "Encoding not implemented" unless Object.const_defined? :Encoding
input = "# coding: ISO-2022-JP\n:\e$B%3%^%s%I\e(B:"
@tempfile.write input
@tempfile.flush
contents = RDoc::Encoding.read_file @tempfile.path, Encoding::UTF_8
expected = ":\xe3\x82\xb3\xe3\x83\x9e\xe3\x83\xb3\xe3\x83\x89:"
expected.force_encoding Encoding::UTF_8
assert_equal expected, contents
assert_equal Encoding::UTF_8, contents.encoding
end
def test_class_set_encoding
s = "# coding: UTF-8\n"
RDoc::Encoding.set_encoding s