diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-18 09:23:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-18 09:23:07 +0000 |
commit | 0c15b3a2221ff156452a9979b70b3e36d7bad6c0 (patch) | |
tree | 7d30f382804d06cb1d60fd451193287f148c920f /test | |
parent | 12eee69294f0692eb74b2daeb7dcf8e000491518 (diff) |
* 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
Diffstat (limited to 'test')
-rw-r--r-- | test/stringio/test_stringio.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb new file mode 100644 index 0000000000..10390fc6da --- /dev/null +++ b/test/stringio/test_stringio.rb @@ -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 |