summaryrefslogtreecommitdiffhomepage
path: root/test/io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/io.rb')
-rw-r--r--test/io.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/io.rb b/test/io.rb
index 9ce8985f7..ee4309b57 100644
--- a/test/io.rb
+++ b/test/io.rb
@@ -238,6 +238,11 @@ assert('IO.sysopen, IO#sysread') do
assert_raise(IOError) { io.sysread(1) }
assert_raise(ArgumentError) { io.sysread(-1) }
io.closed?
+
+ fd = IO.sysopen $mrbtest_io_wfname, "w"
+ io = IO.new fd, "w"
+ assert_raise(IOError) { io.sysread(1) }
+ io.close
end
assert('IO.sysopen, IO#syswrite') do