summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-23 19:15:48 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-23 19:15:48 +0000
commitb487d9459d6a7c2d64f496b3fc808fab571db2ab (patch)
treebefdb2d3be20208e09998801b73af80f69fd0fb5 /test
parente963ff1e987430e4979c9a62ccb639cc977e0689 (diff)
add test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io_m17n.rb11
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