add assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
648cd42f77
commit
7e237b9813
@ -161,6 +161,8 @@ EOT
|
|||||||
eucjp = "\xb3\xa2".force_encoding("EUC-JP")
|
eucjp = "\xb3\xa2".force_encoding("EUC-JP")
|
||||||
with_tmpdir {
|
with_tmpdir {
|
||||||
open('tmp', "w:EUC-JP") {|f|
|
open('tmp', "w:EUC-JP") {|f|
|
||||||
|
assert_equal(Encoding::EUC_JP, f.external_encoding)
|
||||||
|
assert_equal(nil, f.internal_encoding)
|
||||||
f.print utf8
|
f.print utf8
|
||||||
}
|
}
|
||||||
assert_equal(eucjp, File.read('tmp').force_encoding("EUC-JP"))
|
assert_equal(eucjp, File.read('tmp').force_encoding("EUC-JP"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user