ruby-changes:6042
From: usa <ko1@a...>
Date: Tue, 24 Jun 2008 10:27:05 +0900 (JST)
Subject: [ruby-changes:6042] Ruby:r17552 (trunk): * test_process.rb (test_popen_fork): skip test if fork is not implemented.
usa 2008-06-24 10:26:54 +0900 (Tue, 24 Jun 2008) New Revision: 17552 Modified files: trunk/test/ruby/test_process.rb Log: * test_process.rb (test_popen_fork): skip test if fork is not implemented. * test_process.rb (test_getpriority): skip test if Process::PRIO_USER is not defined. * test_process.rb (test_setpriority): cannot rescue exceptions which raise in assert_nothing_raised. check Process:PRIO_USER before test to skip instead. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_process.rb?r1=17552&r2=17551&diff_format=u Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 17551) +++ test/ruby/test_process.rb (revision 17552) @@ -454,6 +454,7 @@ assert_equal("fooo\n", io.read) end } + rescue NotImplementedError end def test_fd_inheritance @@ -931,15 +932,16 @@ def test_getpriority assert_kind_of(Integer, Process.getpriority(Process::PRIO_USER, 0)) - rescue NotImplementedError + rescue NameError, NotImplementedError end def test_setpriority - assert_nothing_raised do - pr = Process.getpriority(Process::PRIO_USER, 0) - Process.setpriority(Process::PRIO_USER, 0, pr) + if defined? Process::PRIO_USER + assert_nothing_raised do + pr = Process.getpriority(Process::PRIO_USER, 0) + Process.setpriority(Process::PRIO_USER, 0, pr) + end end - rescue NotImplementedError end def test_getuid -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/