summaryrefslogtreecommitdiff
path: root/test/ruby/ut_eof.rb
diff options
context:
space:
mode:
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 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))