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

add assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-12-23 17:31:32 +00:00
parent 648cd42f77
commit 7e237b9813

View file

@ -161,6 +161,8 @@ EOT
eucjp = "\xb3\xa2".force_encoding("EUC-JP")
with_tmpdir {
open('tmp', "w:EUC-JP") {|f|
assert_equal(Encoding::EUC_JP, f.external_encoding)
assert_equal(nil, f.internal_encoding)
f.print utf8
}
assert_equal(eucjp, File.read('tmp').force_encoding("EUC-JP"))