mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-io/test: remove test for internal IO#_read_buf
This commit is contained in:
@@ -304,29 +304,6 @@ assert('IO.sysopen, IO#syswrite') do
|
||||
io.close
|
||||
end
|
||||
|
||||
assert('IO#_read_buf') do
|
||||
fd = IO.sysopen $mrbtest_io_rfname
|
||||
io = IO.new fd
|
||||
def io._buf
|
||||
@buf
|
||||
end
|
||||
msg_len = $mrbtest_io_msg.size
|
||||
assert_equal '', io._buf
|
||||
assert_equal $mrbtest_io_msg, io._read_buf
|
||||
assert_equal $mrbtest_io_msg, io._buf
|
||||
assert_equal 'mruby', io.read(5)
|
||||
assert_equal 5, io.pos
|
||||
assert_equal msg_len - 5, io._buf.size
|
||||
assert_equal $mrbtest_io_msg[5,100], io.read
|
||||
assert_equal 0, io._buf.size
|
||||
assert_raise EOFError do
|
||||
io._read_buf
|
||||
end
|
||||
assert_equal true, io.eof
|
||||
assert_equal true, io.eof?
|
||||
io.close
|
||||
end
|
||||
|
||||
assert('IO#ungetc') do
|
||||
io = IO.new(IO.sysopen($mrbtest_io_rfname))
|
||||
assert_equal 'm', io.getc
|
||||
|
||||
Reference in New Issue
Block a user