ruby-changes:47753
From: nobu <ko1@a...>
Date: Thu, 14 Sep 2017 02:07:25 +0900 (JST)
Subject: [ruby-changes:47753] nobu:r59870 (trunk): test_rubyoptions.rb: keep paths if necessary
nobu 2017-09-14 02:07:19 +0900 (Thu, 14 Sep 2017) New Revision: 59870 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59870 Log: test_rubyoptions.rb: keep paths if necessary * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_search): PATH must keep library loading paths on a platform where it is used for that purpose, for extra libraries. [ruby-core:81178] [Bug #13569] [Fix GH-1616] Modified files: trunk/test/ruby/test_rubyoptions.rb Index: test/ruby/test_rubyoptions.rb =================================================================== --- test/ruby/test_rubyoptions.rb (revision 59869) +++ test/ruby/test_rubyoptions.rb (revision 59870) @@ -298,13 +298,15 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L298 @verbose = $VERBOSE $VERBOSE = nil - ENV['PATH'] = File.dirname(t.path) + path, name = *File.split(t.path) - assert_in_out_err(%w(-S) + [File.basename(t.path)], "", %w(1), []) + ENV['PATH'] = (path_orig && RbConfig::CONFIG['LIBPATHENV'] == 'PATH') ? + [path, path_orig].join(File::PATH_SEPARATOR) : path + assert_in_out_err(%w(-S) + [name], "", %w(1), []) + ENV['PATH'] = path_orig - ENV['RUBYPATH'] = File.dirname(t.path) - - assert_in_out_err(%w(-S) + [File.basename(t.path)], "", %w(1), []) + ENV['RUBYPATH'] = path + assert_in_out_err(%w(-S) + [name], "", %w(1), []) } ensure -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/