ruby-changes:3047
From: ko1@a...
Date: 24 Dec 2007 02:13:09 +0900
Subject: [ruby-changes:3047] akr - Ruby:r14539 (trunk): update tests.
akr 2007-12-24 02:12:57 +0900 (Mon, 24 Dec 2007)
New Revision: 14539
Modified files:
trunk/test/ruby/test_io_m17n.rb
Log:
update tests.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_io_m17n.rb?r1=14539&r2=14538
Index: test/ruby/test_io_m17n.rb
===================================================================
--- test/ruby/test_io_m17n.rb (revision 14538)
+++ test/ruby/test_io_m17n.rb (revision 14539)
@@ -46,9 +46,10 @@
def test_terminator_conversion
with_tmpdir {
generate_file('tmp', "before \u00FF after")
- s = open("tmp", "r:iso-8859-1:utf-8") {|f|
+ s = open("tmp", "r:utf-8:iso-8859-1") {|f|
f.gets("\xFF".force_encoding("iso-8859-1"))
}
+ assert_equal(Encoding.find("iso-8859-1"), s.encoding)
assert_str_equal("before \xFF".force_encoding("iso-8859-1"), s, '[ruby-core:14288]')
}
end
@@ -163,7 +164,7 @@
f.print utf8
}
assert_equal(eucjp, File.read('tmp').force_encoding("EUC-JP"))
- open('tmp', 'r:UTF-8:EUC-JP') {|f|
+ open('tmp', 'r:EUC-JP:UTF-8') {|f|
assert_equal(Encoding::EUC_JP, f.external_encoding)
assert_equal(Encoding::UTF_8, f.internal_encoding)
assert_equal(utf8, f.read)
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml