ruby-changes:52185
From: naruse <ko1@a...>
Date: Thu, 16 Aug 2018 19:50:59 +0900 (JST)
Subject: [ruby-changes:52185] naruse:r64393 (trunk): skip examples failing on solaris
naruse 2018-08-16 19:50:53 +0900 (Thu, 16 Aug 2018) New Revision: 64393 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64393 Log: skip examples failing on solaris Modified files: trunk/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb trunk/spec/ruby/library/socket/addrinfo/marshal_dump_spec.rb trunk/spec/ruby/library/socket/ancillarydata/initialize_spec.rb trunk/spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb Index: spec/ruby/library/socket/addrinfo/marshal_dump_spec.rb =================================================================== --- spec/ruby/library/socket/addrinfo/marshal_dump_spec.rb (revision 64392) +++ spec/ruby/library/socket/addrinfo/marshal_dump_spec.rb (revision 64393) @@ -32,8 +32,10 @@ describe 'Addrinfo#marshal_dump' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/addrinfo/marshal_dump_spec.rb#L32 @array[3].should == 'SOCK_STREAM' end - it 'includes the protocol as the 5th value' do - @array[4].should == 'IPPROTO_TCP' + platform_is_not :'solaris2.10' do # i386-solaris + it 'includes the protocol as the 5th value' do + @array[4].should == 'IPPROTO_TCP' + end end it 'includes the canonical name as the 6th value' do Index: spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb =================================================================== --- spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb (revision 64392) +++ spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb (revision 64393) @@ -75,10 +75,12 @@ describe 'Addrinfo.getaddrinfo' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb#L75 end end - it 'sets a custom socket protocol of the Addrinfo instances' do - array = Addrinfo.getaddrinfo('localhost', 80, nil, nil, Socket::IPPROTO_UDP) + platform_is_not :'solaris2.10' do # i386-solaris + it 'sets a custom socket protocol of the Addrinfo instances' do + array = Addrinfo.getaddrinfo('localhost', 80, nil, nil, Socket::IPPROTO_UDP) - array[0].protocol.should == Socket::IPPROTO_UDP + array[0].protocol.should == Socket::IPPROTO_UDP + end end platform_is_not :solaris do Index: spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb =================================================================== --- spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb (revision 64392) +++ spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb (revision 64393) @@ -50,10 +50,12 @@ with_feature :ancillary_data do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb#L50 lambda { data.unix_rights }.should raise_error(TypeError) end - it 'raises TypeError when the type is not SCM_RIGHTS' do - data = Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '') + platform_is_not :"solaris2.10" do + it 'raises TypeError when the type is not SCM_RIGHTS' do + data = Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '') - lambda { data.unix_rights }.should raise_error(TypeError) + lambda { data.unix_rights }.should raise_error(TypeError) + end end end end Index: spec/ruby/library/socket/ancillarydata/initialize_spec.rb =================================================================== --- spec/ruby/library/socket/ancillarydata/initialize_spec.rb (revision 64392) +++ spec/ruby/library/socket/ancillarydata/initialize_spec.rb (revision 64393) @@ -106,8 +106,10 @@ with_feature :ancillary_data do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/ancillarydata/initialize_spec.rb#L106 Socket::AncillaryData.new(:INET, :SOCKET, :RIGHTS, '').type.should == Socket::SCM_RIGHTS end - it 'sets the type to SCM_TIMESTAMP when using :TIMESTAMP as the type argument' do - Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '').type.should == Socket::SCM_TIMESTAMP + platform_is_not :"solaris2.10" do + it 'sets the type to SCM_TIMESTAMP when using :TIMESTAMP as the type argument' do + Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '').type.should == Socket::SCM_TIMESTAMP + end end it 'raises TypeError when using a numeric string as the type argument' do -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/