1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/stringio/test_stringio.rb
nobu 6395c3b38d * ext/stringio/stringio.c (strio_read): adjust behavior at reading
beyond EOF to IO.  [ruby-dev:22205]

* test/ruby/ut_eof.rb (TestEOF::Seek): test behaviors at reading
  beyond EOF.

* test/ruby/test_file.rb, * test/stringio/test_stringio.rb:
  include TestEOF::Seek test case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-10 08:16:14 +00:00

17 lines
359 B
Ruby

require 'test/unit'
require 'stringio'
dir = File.expand_path(__FILE__)
2.times {dir = File.dirname(dir)}
$:.replace([File.join(dir, "ruby")] | $:)
require 'ut_eof'
class TestStringIO < Test::Unit::TestCase
include TestEOF
def open_file(content)
f = StringIO.new(content)
yield f
end
alias open_file_rw open_file
include TestEOF::Seek
end