summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_argf.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb
index fb869561a1..104a681ee0 100644
--- a/test/ruby/test_argf.rb
+++ b/test/ruby/test_argf.rb
@@ -504,6 +504,17 @@ class TestArgf < Test::Unit::TestCase
end
end
+ def test_readpartial_eof_twice
+ ruby('-W1', '-e', <<-SRC, @t1.path) do |f|
+ $stderr = $stdout
+ print ARGF.readpartial(256)
+ ARGF.readpartial(256) rescue p($!.class)
+ ARGF.readpartial(256) rescue p($!.class)
+ SRC
+ assert_equal("1\n2\nEOFError\nEOFError\n", f.read)
+ end
+ end
+
def test_getc
ruby('-e', <<-SRC, @t1.path, @t2.path, @t3.path) do |f|
s = ""