diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-23 17:12:57 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-23 17:12:57 +0000 |
commit | 6dcaaece8d07d4e1677146a7cd19b8e1d483154d (patch) | |
tree | d167a4ce1c77fc9ac79a61981c33351ca6d2f2d4 /test/ruby/test_io_m17n.rb | |
parent | 0f138c5bc58042a3b0dafe3c690c512337ca759f (diff) | |
download | ruby-6dcaaece8d07d4e1677146a7cd19b8e1d483154d.tar.gz ruby-6dcaaece8d07d4e1677146a7cd19b8e1d483154d.tar.xz ruby-6dcaaece8d07d4e1677146a7cd19b8e1d483154d.zip |
update tests.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r-- | test/ruby/test_io_m17n.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index e859f6d39..5318952f1 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -46,9 +46,10 @@ EOT 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 @@ EOT 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) |