1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

getsockname returns "" on MacOS X

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2006-06-07 10:57:26 +00:00
parent af19c66570
commit a0261afccd

View file

@ -81,10 +81,12 @@ class TestUNIXSocket < Test::Unit::TestCase
def test_noname_unpack_sockaddr_un
s1, s2 = UNIXSocket.pair
assert_equal("", Socket.unpack_sockaddr_un(s1.getsockname))
assert_equal("", Socket.unpack_sockaddr_un(s2.getsockname))
assert_equal("", Socket.unpack_sockaddr_un(s1.getpeername))
assert_equal("", Socket.unpack_sockaddr_un(s2.getpeername))
n = nil
assert_equal("", Socket.unpack_sockaddr_un(n)) if (n = s1.getsockname) != ""
assert_equal("", Socket.unpack_sockaddr_un(n)) if (n = s1.getsockname) != ""
assert_equal("", Socket.unpack_sockaddr_un(n)) if (n = s2.getsockname) != ""
assert_equal("", Socket.unpack_sockaddr_un(n)) if (n = s1.getpeername) != ""
assert_equal("", Socket.unpack_sockaddr_un(n)) if (n = s2.getpeername) != ""
ensure
s1.close
s2.close