aboutsummaryrefslogtreecommitdiffstats
path: root/test/socket/test_tcp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/socket/test_tcp.rb')
-rw-r--r--test/socket/test_tcp.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb
index 450d1b35b5..11325fdedb 100644
--- a/test/socket/test_tcp.rb
+++ b/test/socket/test_tcp.rb
@@ -8,6 +8,15 @@ end
class TestSocket_TCPSocket < Test::Unit::TestCase
+ def test_inspect
+ TCPServer.open("localhost", 0) {|server|
+ assert_match(/AF_INET/, server.inspect)
+ TCPSocket.open("localhost", server.addr[1]) {|client|
+ assert_match(/AF_INET/, client.inspect)
+ }
+ }
+ end
+
def test_initialize_failure
# These addresses are chosen from TEST-NET-1, TEST-NET-2, and TEST-NET-3.
# [RFC 5737]