ruby-changes:46660
From: ko1 <ko1@a...>
Date: Wed, 17 May 2017 23:43:28 +0900 (JST)
Subject: [ruby-changes:46660] ko1:r58776 (trunk): modify r58771.
ko1 2017-05-17 23:43:22 +0900 (Wed, 17 May 2017) New Revision: 58776 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58776 Log: modify r58771. * spec/rubyspec/command_line/dash_upper_s_spec.rb: enable tests on vboxsf (VirtualBox shared directory) and change tests to match /success$/ to ignore warnings. This technique is suggested by @unak. Modified files: trunk/spec/rubyspec/command_line/dash_upper_s_spec.rb Index: spec/rubyspec/command_line/dash_upper_s_spec.rb =================================================================== --- spec/rubyspec/command_line/dash_upper_s_spec.rb (revision 58775) +++ spec/rubyspec/command_line/dash_upper_s_spec.rb (revision 58776) @@ -8,18 +8,16 @@ describe 'The -S command line option' do https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/command_line/dash_upper_s_spec.rb#L8 platform_is_not :windows do # On VirtualBox shared directory (vboxsf) all files are world writable # and MRI shows warning when including world writable path in ENV['PATH']. - # This warning fails the following tests. - unless FileTest.world_writable?(fixture(__FILE__, "bin")) + # This is why we are using /success$/ matching in the following cases. - it "runs launcher found in PATH, but only code after the first /\#!.*ruby.*/-ish line in target file" do - result = ruby_exe(nil, options: '-S hybrid_launcher.sh', env: { 'PATH' => @path }, args: '2>&1') - result.should == "success\n" - end + it "runs launcher found in PATH, but only code after the first /\#!.*ruby.*/-ish line in target file" do + result = ruby_exe(nil, options: '-S hybrid_launcher.sh', env: { 'PATH' => @path }, args: '2>&1') + result.should =~ /success$/ + end - it "runs launcher found in PATH" do - result = ruby_exe(nil, options: '-S launcher.rb', env: { 'PATH' => @path }, args: '2>&1') - result.should == "success\n" - end + it "runs launcher found in PATH" do + result = ruby_exe(nil, options: '-S launcher.rb', env: { 'PATH' => @path }, args: '2>&1') + result.should =~ /success$/ end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/