ruby-changes:8994
From: usa <ko1@a...>
Date: Fri, 5 Dec 2008 01:40:07 +0900 (JST)
Subject: [ruby-changes:8994] Ruby:r20530 (trunk): * test/ruby/test_process.rb: skip some tests on win32.
usa 2008-12-05 01:39:55 +0900 (Fri, 05 Dec 2008) New Revision: 20530 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20530 Log: * test/ruby/test_process.rb: skip some tests on win32. Modified files: trunk/test/ruby/test_process.rb Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 20529) +++ test/ruby/test_process.rb (revision 20530) @@ -127,6 +127,7 @@ end def test_execopts_pgroup + skip "system(:pgroup) is not supported" if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM assert_nothing_raised { system(*TRUECOMMAND, :pgroup=>false) } io = IO.popen([RUBY, "-e", "print Process.getpgrp"]) @@ -495,6 +496,7 @@ end def test_fd_inheritance + skip "inheritance of fd>=3 is not supported" if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM with_pipe {|r, w| system(RUBY, '-e', 'IO.new(ARGV[0].to_i).puts(:ba)', w.fileno.to_s) w.close @@ -598,14 +600,18 @@ end def test_execopts_redirect_self - with_pipe {|r, w| - w << "haha\n" - w.close - r.close_on_exec = true - IO.popen([RUBY, "-e", "print IO.new(#{r.fileno}).read", r.fileno=>r.fileno, :close_others=>false]) {|io| - assert_equal("haha\n", io.read) + begin + with_pipe {|r, w| + w << "haha\n" + w.close + r.close_on_exec = true + IO.popen([RUBY, "-e", "print IO.new(#{r.fileno}).read", r.fileno=>r.fileno, :close_others=>false]) {|io| + assert_equal("haha\n", io.read) + } } - } + rescue NotImplementedError + skip "IO#close_on_exec= is not supported" + end end def test_execopts_duplex_io -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/