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
@ -66,6 +66,17 @@ EOT
|
|||||||
}
|
}
|
||||||
end
|
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
|
def test_pipe_terminator_conversion
|
||||||
with_pipe("euc-jp:utf-8") {|r, w|
|
with_pipe("euc-jp:utf-8") {|r, w|
|
||||||
w.write "before \xa2\xa2 after"
|
w.write "before \xa2\xa2 after"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user