diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-23 19:15:48 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-23 19:15:48 +0000 |
commit | b487d9459d6a7c2d64f496b3fc808fab571db2ab (patch) | |
tree | befdb2d3be20208e09998801b73af80f69fd0fb5 /test/ruby/test_io_m17n.rb | |
parent | e963ff1e987430e4979c9a62ccb639cc977e0689 (diff) | |
download | ruby-b487d9459d6a7c2d64f496b3fc808fab571db2ab.tar.gz |
add test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r-- | test/ruby/test_io_m17n.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 4efe96e201..88e862dff6 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -225,6 +225,17 @@ EOT assert_equal(enc, s.encoding) } } + + ENCS.reject {|e| e == Encoding::ASCII_8BIT }.each {|enc| + with_pipe("#{enc}:UTF-8") {|r, w| + w << "\xc2\xa1" + w.close + s = r.read + assert_equal(Encoding::UTF_8, s.encoding) + assert_equal(s.encode("UTF-8"), s) + } + } + end end |