diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-11 13:31:43 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-11 13:31:43 +0000 |
commit | 984986a0a791c576a1e02b1f9912cc4558e1f038 (patch) | |
tree | cd736c217832985974818774257d03b7577ebb22 /spec | |
parent | 8ef27ac1920a9df717a55671de1589c12899d487 (diff) | |
download | ruby-984986a0a791c576a1e02b1f9912cc4558e1f038.tar.gz |
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
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb b/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb index d8f91e15b7..9b0a5a654f 100644 --- a/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb +++ b/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb @@ -10,10 +10,12 @@ describe 'Addrinfo.getaddrinfo' do end SocketSpecs.each_ip_protocol do |family, ip_address| - it 'sets the IP address of the Addrinfo instances' do - array = Addrinfo.getaddrinfo(ip_address, 80) + platform_is_not :solaris do + 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 it 'sets the port of the Addrinfo instances' do @@ -49,7 +51,7 @@ describe 'Addrinfo.getaddrinfo' do end end - platform_is_not :windows do + platform_is_not :solaris, :windows do it 'sets the default socket type of the Addrinfo instances' do array = Addrinfo.getaddrinfo('localhost', 80) possible = [Socket::SOCK_STREAM, Socket::SOCK_DGRAM] @@ -64,7 +66,7 @@ describe 'Addrinfo.getaddrinfo' do array[0].socktype.should == Socket::SOCK_DGRAM end - platform_is_not :windows do + platform_is_not :solaris, :windows do it 'sets the default socket protocol of the Addrinfo instances' do array = Addrinfo.getaddrinfo('localhost', 80) possible = [Socket::IPPROTO_TCP, Socket::IPPROTO_UDP] @@ -79,10 +81,12 @@ describe 'Addrinfo.getaddrinfo' do array[0].protocol.should == Socket::IPPROTO_UDP end - it 'sets the canonical name when AI_CANONNAME is given as a flag' do - array = Addrinfo - .getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME) + platform_is_not :solaris do + it 'sets the canonical name when AI_CANONNAME is given as a flag' do + 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 |