spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb: skip on Android

FreeBSD's GETNAMEINFO(3) says:

> If a link-layer address or UNIX-domain address is passed to
> getnameinfo(), its ASCII representation will be stored in host.  The
> string pointed to by serv will be set to the empty string if non-NULL;
> flags will always be ignored.

Android seems to behave like FreeBSD.
This commit is contained in:
Yusuke Endoh 2020-02-13 23:13:17 +09:00
parent 09a042ae04
commit bbc6799334

View File

@ -21,18 +21,20 @@ describe 'Addrinfo#getnameinfo' do
end end
platform_is :linux do platform_is :linux do
with_feature :unix_socket do platform_is_not :android do
describe 'using a UNIX Addrinfo' do with_feature :unix_socket do
before do describe 'using a UNIX Addrinfo' do
@addr = Addrinfo.unix('cats') before do
@host = Socket.gethostname @addr = Addrinfo.unix('cats')
end @host = Socket.gethostname
end
it 'returns the hostname and UNIX socket path' do it 'returns the hostname and UNIX socket path' do
host, path = @addr.getnameinfo host, path = @addr.getnameinfo
host.should == @host host.should == @host
path.should == 'cats' path.should == 'cats'
end
end end
end end
end end