From bf625b1809e01a8fe505f5a344149e8df8e3795e Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 5 Dec 2003 02:54:48 +0000 Subject: * ext/stringio/stringio.c (strio_read): follow IO#read. * test/ruby/ut_eof.rb, test/ruby/test_file.rb, test/ruby/test_pipe.rb, test/stringio/test_stringio.rb: add EOF test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_file.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/ruby/test_file.rb') diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb index 0d0ea389a..f51e55f0c 100644 --- a/test/ruby/test_file.rb +++ b/test/ruby/test_file.rb @@ -1,4 +1,7 @@ require 'test/unit' +require 'tempfile' +$:.replace([File.dirname(File.expand_path(__FILE__))] | $:) +require 'ut_eof' $KCODE = 'none' @@ -29,4 +32,12 @@ class TestFile < Test::Unit::TestCase File.unlink(filename) if File.exist?(filename) end end + + include TestEOF + def open_file(content) + f = Tempfile.new("test-eof") + f << content + f.rewind + yield f + end end -- cgit