* 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
@ -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>
|
Wed Jul 23 21:38:16 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* test/ruby/test_marshal.rb: suppress warning during test.
|
* test/ruby/test_marshal.rb: suppress warning during test.
|
||||||
|
@ -8,22 +8,17 @@ end
|
|||||||
class TestTCPSocket < Test::Unit::TestCase
|
class TestTCPSocket < Test::Unit::TestCase
|
||||||
def test_recvfrom
|
def test_recvfrom
|
||||||
assert false, "TODO: doesn't work on mswin32/64" if /mswin/ =~ RUBY_PLATFORM
|
assert false, "TODO: doesn't work on mswin32/64" if /mswin/ =~ RUBY_PLATFORM
|
||||||
c = s = nil
|
|
||||||
svr = TCPServer.new("localhost", 0)
|
svr = TCPServer.new("localhost", 0)
|
||||||
th = Thread.new {
|
th = Thread.new {
|
||||||
c = svr.accept
|
c = svr.accept
|
||||||
Thread.pass
|
c.write "foo"
|
||||||
ObjectSpace.each_object(String) {|s|
|
c.close
|
||||||
s.replace "a" if s.length == 0x10000 and !s.frozen?
|
|
||||||
}
|
|
||||||
c.print("x"*0x1000)
|
|
||||||
}
|
}
|
||||||
addr = svr.addr
|
addr = svr.addr
|
||||||
sock = TCPSocket.open(addr[2], addr[1])
|
sock = TCPSocket.open(addr[2], addr[1])
|
||||||
assert_raise(RuntimeError, SocketError, "[ruby-dev:24705]") {
|
assert_equal(["foo", nil], sock.recvfrom(0x10000))
|
||||||
sock.recvfrom(0x10000)
|
|
||||||
}
|
|
||||||
ensure
|
ensure
|
||||||
|
th.kill
|
||||||
th.join
|
th.join
|
||||||
end
|
end
|
||||||
end if defined?(TCPSocket)
|
end if defined?(TCPSocket)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user