[前][次][番号順一覧][スレッド一覧]

ruby-changes:52207

From: eregon <ko1@a...>
Date: Fri, 17 Aug 2018 22:07:28 +0900 (JST)
Subject: [ruby-changes:52207] eregon:r64415 (trunk): Guard with a :pktinfo feature specs relying on PKTINFO

eregon	2018-08-17 22:07:24 +0900 (Fri, 17 Aug 2018)

  New Revision: 64415

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64415

  Log:
    Guard with a :pktinfo feature specs relying on PKTINFO

  Modified files:
    trunk/spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb
    trunk/spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb
    trunk/spec/ruby/library/socket/spec_helper.rb
Index: spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb
===================================================================
--- spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb	(revision 64414)
+++ spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb	(revision 64415)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb#L1
 require_relative '../spec_helper'
 
-with_feature :ancillary_data do
+with_feature :ancillary_data, :pktinfo do
   describe 'Socket::AncillaryData.ip_pktinfo' do
     describe 'with a source address and index' do
       before do
Index: spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb
===================================================================
--- spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb	(revision 64414)
+++ spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb	(revision 64415)
@@ -15,8 +15,10 @@ with_feature :ancillary_data do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb#L15
         @data.cmsg_is?(:IP, :TTL).should == true
       end
 
-      it 'returns false when comparing with :IP and :PKTINFO' do
-        @data.cmsg_is?(:IP, :PKTINFO).should == false
+      with_feature :pktinfo do
+        it 'returns false when comparing with :IP and :PKTINFO' do
+          @data.cmsg_is?(:IP, :PKTINFO).should == false
+        end
       end
 
       it 'returns false when comparing with :SOCKET and :RIGHTS' do
Index: spec/ruby/library/socket/spec_helper.rb
===================================================================
--- spec/ruby/library/socket/spec_helper.rb	(revision 64414)
+++ spec/ruby/library/socket/spec_helper.rb	(revision 64415)
@@ -9,6 +9,7 @@ MSpec.enable_feature :sock_packet if Soc https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/spec_helper.rb#L9
 MSpec.enable_feature :unix_socket unless PlatformGuard.windows?
 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 :pktinfo if Socket.const_defined?(:IP_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 :ipv6_nexthop if Socket.const_defined?(:IPV6_NEXTHOP)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]