summaryrefslogtreecommitdiff
path: root/test/ruby/test_argf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_argf.rb')
-rw-r--r--test/ruby/test_argf.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb
index c00db99bf9..ed92a516ad 100644
--- a/test/ruby/test_argf.rb
+++ b/test/ruby/test_argf.rb
@@ -437,6 +437,18 @@ class TestArgf < Test::Unit::TestCase
assert_equal(x, a.shift)
end
end
+
+ t1 = Tempfile.new("foo")
+ t1.binmode
+ t1.puts "foo"
+ t1.close
+ t2 = Tempfile.new("bar")
+ t2.binmode
+ t2.puts "bar"
+ t2.close
+ ruby('-e', 'STDERR.reopen(STDOUT); ARGF.gets; ARGF.skip; p ARGF.eof?', t1.path, t2.path) do |f|
+ assert_equal(%w(false), f.read.split(/\n/))
+ end
end
def test_read