mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
IO#read(0) should return "" immediately. fixes iij/mruby-socket#13.
This commit is contained in:
@@ -93,6 +93,7 @@ assert('IO#read', '15.2.20.5.14') do
|
||||
assert_raise(TypeError) { io.read("str") }
|
||||
|
||||
len = $mrbtest_io_msg.length
|
||||
assert_equal '', io.read(0)
|
||||
assert_equal 'mruby', io.read(5)
|
||||
assert_equal $mrbtest_io_msg[5,len], io.read(len)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user