зеркало из https://github.com/github/ruby.git
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
e1ada191df
Коммит
a4eedafb13
|
@ -298,13 +298,15 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
@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
|
||||
|
|
Загрузка…
Ссылка в новой задаче