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

Guard with a :pktinfo feature specs relying on PKTINFO

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2018-08-17 13:07:24 +00:00
parent a48339c2c9
commit 28ed3c0f80
3 changed files with 6 additions and 3 deletions

View file

@ -15,8 +15,10 @@ with_feature :ancillary_data do
@data.cmsg_is?(:IP, :TTL).should == true @data.cmsg_is?(:IP, :TTL).should == true
end end
it 'returns false when comparing with :IP and :PKTINFO' do with_feature :pktinfo do
@data.cmsg_is?(:IP, :PKTINFO).should == false it 'returns false when comparing with :IP and :PKTINFO' do
@data.cmsg_is?(:IP, :PKTINFO).should == false
end
end end
it 'returns false when comparing with :SOCKET and :RIGHTS' do it 'returns false when comparing with :SOCKET and :RIGHTS' do

View file

@ -1,6 +1,6 @@
require_relative '../spec_helper' require_relative '../spec_helper'
with_feature :ancillary_data do with_feature :ancillary_data, :pktinfo do
describe 'Socket::AncillaryData.ip_pktinfo' do describe 'Socket::AncillaryData.ip_pktinfo' do
describe 'with a source address and index' do describe 'with a source address and index' do
before do before do

View file

@ -9,6 +9,7 @@ MSpec.enable_feature :sock_packet if Socket.const_defined?(:SOCK_PACKET)
MSpec.enable_feature :unix_socket unless PlatformGuard.windows? MSpec.enable_feature :unix_socket unless PlatformGuard.windows?
MSpec.enable_feature :udp_cork if Socket.const_defined?(:UDP_CORK) MSpec.enable_feature :udp_cork if Socket.const_defined?(:UDP_CORK)
MSpec.enable_feature :tcp_cork if Socket.const_defined?(:TCP_CORK) MSpec.enable_feature :tcp_cork if Socket.const_defined?(:TCP_CORK)
MSpec.enable_feature :pktinfo if Socket.const_defined?(:IP_PKTINFO)
MSpec.enable_feature :ipv6_pktinfo if Socket.const_defined?(:IPV6_PKTINFO) MSpec.enable_feature :ipv6_pktinfo if Socket.const_defined?(:IPV6_PKTINFO)
MSpec.enable_feature :ip_mtu if Socket.const_defined?(:IP_MTU) MSpec.enable_feature :ip_mtu if Socket.const_defined?(:IP_MTU)
MSpec.enable_feature :ipv6_nexthop if Socket.const_defined?(:IPV6_NEXTHOP) MSpec.enable_feature :ipv6_nexthop if Socket.const_defined?(:IPV6_NEXTHOP)