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@15643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fa0f42d4b9
commit
21c9bd1b33
1 changed files with 9 additions and 0 deletions
|
@ -426,5 +426,14 @@ EOT
|
|||
assert_equal("\u{3042}".encode("euc-jp"), result)
|
||||
}
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue