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

add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-12-24 01:09:37 +00:00
parent c806d3f53f
commit e2630984e9

View file

@ -66,6 +66,17 @@ EOT
}
end
def test_nonascii_terminator
with_tmpdir {
generate_file('tmp', "before \xA2\xA2 after")
open("tmp", "r:euc-jp") {|f|
assert_raise(ArgumentError) {
f.gets("\xA2\xA2".force_encoding("utf-8"))
}
}
}
end
def test_pipe_terminator_conversion
with_pipe("euc-jp:utf-8") {|r, w|
w.write "before \xa2\xa2 after"