summaryrefslogtreecommitdiff
path: root/test/ruby/ut_eof.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-09 05:33:32 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-09 05:33:32 +0000
commit75b3b1901cfb16af3ac3bd47ba53325f0696455d (patch)
tree0571ea9d2006093a3e52a11bf53b467931a339e0 /test/ruby/ut_eof.rb
parent231f7cb95ff551c4e1aa4c67d22bc36143b0ff42 (diff)
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.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/ut_eof.rb b/test/ruby/ut_eof.rb
index d1ad9a5fea0..f1ce4f71989 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))