Project

General

Profile

Actions

Bug #3305

closed

test_processのMANDATORY_ENVS

Added by tarui (Masaya Tarui) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2dev (2010-05-16 revision 27850) [i386-mswin32_90]
Backport:
[ruby-dev:41332]

Description

=begin
現状だと以下のようになります。OSはWindowsXP SP3です。

c:\bin\ruby.exe test\ruby\test_process.rb
(snip)

  1. Failure:
    test_execopts_env(TestProcess) [test/ruby/test_process.rb:252]:
    <"PATH\n"> expected but was
    <"">.
    (snip)
  2. Failure:
    test_execopts_unsetenv_others(TestProcess) [test/ruby/test_process.rb:290]:
    <"A=B\n"> expected but was
    <"">.
    (snip)
    56 tests, 132 assertions, 2 failures, 0 errors, 8 skips

どうやら、起動時にSystemRootが必要なようで以下で直ります。

Index: test/ruby/test_process.rb

--- test/ruby/test_process.rb (リビジョン 27851)
+++ test/ruby/test_process.rb (作業コピー)
@@ -222,7 +222,7 @@
when /linux/
MANDATORY_ENVS << 'LD_PRELOAD'
when /mswin|mingw/

  • MANDATORY_ENVS.concat(%w[HOME USER TMPDIR])
  • MANDATORY_ENVS.concat(%w[HOME USER TMPDIR SystemRoot])
    end
    if e = RbConfig::CONFIG['LIBPATHENV']
    MANDATORY_ENVS << e

結果、

c:\bin\ruby.exe test\ruby\test_process.rb
(snip)
56 tests, 143 assertions, 0 failures, 0 errors, 8 skips
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0