[Ruby 1.9 - Bug #3305][Closed] test processのMANDATORY ENVS

Issue #3305 has been updated by Masaya T…

Status changed from Assigned to Closed

発症しなくなっているためcloseします。

Bug #3305: test_processのMANDATORY_ENVS

Author: Masaya T.
Status: Closed
Priority: Low
Assignee: Usaku NAKAMURA
Category: test
Target version: 1.9.x
ruby -v: ruby 1.9.2dev (2010-05-16 revision 27850) [i386-mswin32_90]

=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