summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_io.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index c83dc1c30d..f646c41a69 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -233,6 +233,19 @@ class TestIO < Test::Unit::TestCase
assert_nil r.gets
r.close
end)
+
+ (0..3).each do |i|
+ pipe(proc do |w|
+ w.write("a" * ((4096 << i) - 4), "\r\n" "a\r\n")
+ w.close
+ end,
+ proc do |r|
+ r.gets
+ assert_equal "a", r.gets(chomp: true)
+ assert_nil r.gets
+ r.close
+ end)
+ end
end
def test_gets_chomp_rs_nil