mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Solaris raises EAI_SERVICE if hints.ai_socktype=0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8ef27ac192
commit
984986a0a7
1 changed files with 13 additions and 9 deletions
|
@ -10,10 +10,12 @@ describe 'Addrinfo.getaddrinfo' do
|
||||||
end
|
end
|
||||||
|
|
||||||
SocketSpecs.each_ip_protocol do |family, ip_address|
|
SocketSpecs.each_ip_protocol do |family, ip_address|
|
||||||
it 'sets the IP address of the Addrinfo instances' do
|
platform_is_not :solaris do
|
||||||
array = Addrinfo.getaddrinfo(ip_address, 80)
|
it 'sets the IP address of the Addrinfo instances' do
|
||||||
|
array = Addrinfo.getaddrinfo(ip_address, 80)
|
||||||
|
|
||||||
array[0].ip_address.should == ip_address
|
array[0].ip_address.should == ip_address
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets the port of the Addrinfo instances' do
|
it 'sets the port of the Addrinfo instances' do
|
||||||
|
@ -49,7 +51,7 @@ describe 'Addrinfo.getaddrinfo' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
platform_is_not :windows do
|
platform_is_not :solaris, :windows do
|
||||||
it 'sets the default socket type of the Addrinfo instances' do
|
it 'sets the default socket type of the Addrinfo instances' do
|
||||||
array = Addrinfo.getaddrinfo('localhost', 80)
|
array = Addrinfo.getaddrinfo('localhost', 80)
|
||||||
possible = [Socket::SOCK_STREAM, Socket::SOCK_DGRAM]
|
possible = [Socket::SOCK_STREAM, Socket::SOCK_DGRAM]
|
||||||
|
@ -64,7 +66,7 @@ describe 'Addrinfo.getaddrinfo' do
|
||||||
array[0].socktype.should == Socket::SOCK_DGRAM
|
array[0].socktype.should == Socket::SOCK_DGRAM
|
||||||
end
|
end
|
||||||
|
|
||||||
platform_is_not :windows do
|
platform_is_not :solaris, :windows do
|
||||||
it 'sets the default socket protocol of the Addrinfo instances' do
|
it 'sets the default socket protocol of the Addrinfo instances' do
|
||||||
array = Addrinfo.getaddrinfo('localhost', 80)
|
array = Addrinfo.getaddrinfo('localhost', 80)
|
||||||
possible = [Socket::IPPROTO_TCP, Socket::IPPROTO_UDP]
|
possible = [Socket::IPPROTO_TCP, Socket::IPPROTO_UDP]
|
||||||
|
@ -79,10 +81,12 @@ describe 'Addrinfo.getaddrinfo' do
|
||||||
array[0].protocol.should == Socket::IPPROTO_UDP
|
array[0].protocol.should == Socket::IPPROTO_UDP
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets the canonical name when AI_CANONNAME is given as a flag' do
|
platform_is_not :solaris do
|
||||||
array = Addrinfo
|
it 'sets the canonical name when AI_CANONNAME is given as a flag' do
|
||||||
.getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME)
|
array = Addrinfo
|
||||||
|
.getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME)
|
||||||
|
|
||||||
array[0].canonname.should be_an_instance_of(String)
|
array[0].canonname.should be_an_instance_of(String)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue