1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/stringio/test_stringio.rb: imported from [ruby-dev:21941].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-11-18 09:23:07 +00:00
parent 12eee69294
commit 0c15b3a222
3 changed files with 23 additions and 2 deletions

View file

@ -0,0 +1,15 @@
require 'test/unit'
require 'stringio'
class TestStringIO < Test::Unit::TestCase
def test_empty_file
f = StringIO.new("")
assert_equal("", f.read(0))
assert_equal("", f.read)
assert_equal(nil, f.read(0))
f = StringIO.new("")
assert_equal(nil, f.read(1))
assert_equal(nil, f.read)
assert_equal(nil, f.read(1))
end
end