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

add test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-12-23 19:15:48 +00:00
parent e963ff1e98
commit b487d9459d

View file

@ -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