mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/socket/test_tcp.rb (test_recvfrom): replace an irrelevant test
for old behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ae7e148256
commit
a0895f84b0
2 changed files with 9 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Jul 23 23:19:15 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* test/socket/test_tcp.rb (test_recvfrom): replace an irrelevant test
|
||||
for old behavior.
|
||||
|
||||
Wed Jul 23 21:38:16 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* test/ruby/test_marshal.rb: suppress warning during test.
|
||||
|
|
|
@ -8,22 +8,17 @@ end
|
|||
class TestTCPSocket < Test::Unit::TestCase
|
||||
def test_recvfrom
|
||||
assert false, "TODO: doesn't work on mswin32/64" if /mswin/ =~ RUBY_PLATFORM
|
||||
c = s = nil
|
||||
svr = TCPServer.new("localhost", 0)
|
||||
th = Thread.new {
|
||||
c = svr.accept
|
||||
Thread.pass
|
||||
ObjectSpace.each_object(String) {|s|
|
||||
s.replace "a" if s.length == 0x10000 and !s.frozen?
|
||||
}
|
||||
c.print("x"*0x1000)
|
||||
c.write "foo"
|
||||
c.close
|
||||
}
|
||||
addr = svr.addr
|
||||
sock = TCPSocket.open(addr[2], addr[1])
|
||||
assert_raise(RuntimeError, SocketError, "[ruby-dev:24705]") {
|
||||
sock.recvfrom(0x10000)
|
||||
}
|
||||
assert_equal(["foo", nil], sock.recvfrom(0x10000))
|
||||
ensure
|
||||
th.kill
|
||||
th.join
|
||||
end
|
||||
end if defined?(TCPSocket)
|
||||
|
|
Loading…
Reference in a new issue