add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fa0f42d4b9
commit
21c9bd1b33
@ -426,5 +426,14 @@ EOT
|
|||||||
assert_equal("\u{3042}".encode("euc-jp"), result)
|
assert_equal("\u{3042}".encode("euc-jp"), result)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_file_foreach
|
||||||
|
with_tmpdir {
|
||||||
|
generate_file('tst', 'a' * 8191 + "\xa1\xa1")
|
||||||
|
assert_nothing_raised {
|
||||||
|
File.foreach('tst', :encoding=>"euc-jp") {|line| line.inspect }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user