ruby-changes:6044
From: usa <ko1@a...>
Date: Tue, 24 Jun 2008 11:39:12 +0900 (JST)
Subject: [ruby-changes:6044] Ruby:r17554 (trunk): * test/ruby/test_process.rb (test_exec_wordsplit): on win32, exec'ed process is not child but grandchild.
usa 2008-06-24 11:37:51 +0900 (Tue, 24 Jun 2008) New Revision: 17554 Modified files: trunk/test/ruby/test_process.rb Log: * test/ruby/test_process.rb (test_exec_wordsplit): on win32, exec'ed process is not child but grandchild. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_process.rb?r1=17554&r2=17553&diff_format=u Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 17553) +++ test/ruby/test_process.rb (revision 17554) @@ -684,7 +684,13 @@ def test_exec_wordsplit with_tmpchdir {|d| write_file("script", <<-'End') - File.open("result", "w") {|t| t << "hehe pid=#{$$} ppid=#{Process.ppid}" } + File.open("result", "w") {|t| + if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM + t << "hehe ppid=#{Process.ppid}" + else + t << "hehe pid=#{$$} ppid=#{Process.ppid}" + end + } exit 6 End write_file("s", <<-"End") @@ -697,7 +703,12 @@ assert_equal(pid, status.pid) assert(status.exited?) assert_equal(6, status.exitstatus) - assert_equal("hehe pid=#{status.pid} ppid=#{$$}", File.read("result")) + if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM + expected = "hehe ppid=#{status.pid}" + else + expected = "hehe pid=#{status.pid} ppid=#{$$}" + end + assert_equal(expected, File.read("result")) } end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/