summaryrefslogtreecommitdiff
path: root/test/ruby/test_argf.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-28 05:15:25 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-28 05:15:25 +0000
commit1318dff1a87af926428958a4cdf181d415836439 (patch)
treef74a5d4ad73c3af9c3a04651b6523ba00b13b7b0 /test/ruby/test_argf.rb
parentc8ab5d2dd9caca93f97857acf7d9e945384b2b20 (diff)
add a test for [ruby-dev:34958].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_argf.rb')
-rw-r--r--test/ruby/test_argf.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb
index 82aaa41dca1..63b278198b8 100644
--- a/test/ruby/test_argf.rb
+++ b/test/ruby/test_argf.rb
@@ -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 = []