summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/socket/test_addrinfo.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/socket/test_addrinfo.rb b/test/socket/test_addrinfo.rb
index 02cd714d91..9908278bbd 100644
--- a/test/socket/test_addrinfo.rb
+++ b/test/socket/test_addrinfo.rb
@@ -29,6 +29,12 @@ class TestSocketAddrinfo < Test::Unit::TestCase
assert_equal(Socket::PF_INET, ai.pfamily)
assert_equal(0, ai.socktype)
assert_equal(0, ai.protocol)
+
+ ai = Addrinfo.ip("<any>")
+ assert_equal([0, "0.0.0.0"], Socket.unpack_sockaddr_in(ai))
+
+ ai = Addrinfo.ip("<broadcast>")
+ assert_equal([0, "255.255.255.255"], Socket.unpack_sockaddr_in(ai))
end
def test_addrinfo_tcp