diff options
Diffstat (limited to 'test/socket')
-rw-r--r-- | test/socket/test_socket.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb index 954a748b8..4eab094e7 100644 --- a/test/socket/test_socket.rb +++ b/test/socket/test_socket.rb @@ -72,3 +72,12 @@ class TestBasicSocket < Test::Unit::TestCase end end end if defined?(Socket) + +class TestSocket < Test::Unit::TestCase + def test_unpack_sockaddr + sockaddr_in = Socket.sockaddr_in(80, "") + assert_raise(ArgumentError) { Socket.unpack_sockaddr_un(sockaddr_in) } + sockaddr_un = Socket.sockaddr_un("/tmp/s") + assert_raise(ArgumentError) { Socket.unpack_sockaddr_in(sockaddr_un) } + end +end |