diff options
Diffstat (limited to 'test/socket/test_nonblock.rb')
-rw-r--r-- | test/socket/test_nonblock.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/socket/test_nonblock.rb b/test/socket/test_nonblock.rb index 4e14c9355a..93f463daf9 100644 --- a/test/socket/test_nonblock.rb +++ b/test/socket/test_nonblock.rb @@ -128,6 +128,16 @@ class TestSocketNonblock < Test::Unit::TestCase } mesg = u1.recv_nonblock(100) assert_equal("", mesg) + + buf = "short" + out = "hello world" * 4 + out.freeze + u2.send(out, 0, u1.getsockname) + IO.select [u1] + rv = u1.recv_nonblock(100, 0, buf) + assert_equal rv.object_id, buf.object_id + assert_equal out, rv + assert_equal out, buf ensure u1.close if u1 u2.close if u2 |