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:
parent
c806d3f53f
commit
e2630984e9
1 changed files with 11 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue