diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-09 05:33:32 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-09 05:33:32 +0000 |
commit | 75b3b1901cfb16af3ac3bd47ba53325f0696455d (patch) | |
tree | 0571ea9d2006093a3e52a11bf53b467931a339e0 /test/ruby/ut_eof.rb | |
parent | 231f7cb95ff551c4e1aa4c67d22bc36143b0ff42 (diff) | |
download | ruby-75b3b1901cfb16af3ac3bd47ba53325f0696455d.tar.gz |
add test for previous change to io.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/ut_eof.rb')
-rw-r--r-- | test/ruby/ut_eof.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/ut_eof.rb b/test/ruby/ut_eof.rb index d1ad9a5fea..f1ce4f7198 100644 --- a/test/ruby/ut_eof.rb +++ b/test/ruby/ut_eof.rb @@ -16,6 +16,16 @@ module TestEOF } end + def test_eof_0_rw + return unless respond_to? :open_file_rw + open_file_rw("") {|f| + assert_equal("", f.read) + assert_equal(nil, f.read) + assert_equal(0, f.syswrite("")) + assert_equal(nil, f.read) + } + end + def test_eof_1 open_file("a") {|f| assert_equal("", f.read(0)) |