mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
parent
23c0113932
commit
31f2d8990d
2 changed files with 29 additions and 9 deletions
|
@ -70,6 +70,16 @@ class TestStringIO < Test::Unit::TestCase
|
|||
assert_nil io.getc
|
||||
end
|
||||
|
||||
def test_pread_null
|
||||
io = StringIO.new(nil)
|
||||
assert_raise(EOFError) { io.pread(1, 0) }
|
||||
end
|
||||
|
||||
def test_read_null
|
||||
io = StringIO.new(nil)
|
||||
assert_equal "", io.read(0)
|
||||
end
|
||||
|
||||
def test_seek_null
|
||||
io = StringIO.new(nil)
|
||||
assert_equal(0, io.seek(0, IO::SEEK_SET))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue