mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add a test for [ruby-dev:34958].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c8ab5d2dd9
commit
1318dff1a8
1 changed files with 10 additions and 0 deletions
|
@ -582,6 +582,16 @@ class TestArgf < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_each_line_paragraph
|
||||
EnvUtil.rubyexec('-e', 'ARGF.each_line("") {|para| p para}') do |w, r, e|
|
||||
w << "a\n\nb\n"
|
||||
w.close
|
||||
assert_equal("\"a\\n\\n\"\n", r.gets, "[ruby-dev:34958]")
|
||||
assert_equal("\"b\\n\"\n", r.gets)
|
||||
assert_equal(nil, r.gets)
|
||||
end
|
||||
end
|
||||
|
||||
def test_each_byte
|
||||
ruby('-e', <<-SRC, @t1.path, @t2.path, @t3.path) do |f|
|
||||
s = []
|
||||
|
|
Loading…
Reference in a new issue