aboutsummaryrefslogtreecommitdiffstats
path: root/test/socket/test_socket.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/socket/test_socket.rb')
-rw-r--r--test/socket/test_socket.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index d2aab5f1f3..d3c3840464 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -54,4 +54,16 @@ class TestSocket < Test::Unit::TestCase
def test_getnameinfo
assert_raise(SocketError) { Socket.getnameinfo(["AF_UNIX", 80, "0.0.0.0"]) }
end
+
+ def test_list_ip_address
+ begin
+ list = Socket.list_ip_address
+ rescue NotImplementedError
+ return
+ end
+ list.each {|ai|
+ assert_instance_of(AddrInfo, ai)
+ assert(ai.ip?)
+ }
+ end
end if defined?(Socket)