diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-24 01:26:54 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-24 01:26:54 +0000 |
commit | 7435cf8c5a9799e43c26d9b5d3fa6fb4c99925eb (patch) | |
tree | 95daa283fdb58a51a563a35d8b6b5f992d0a68ca /test | |
parent | e235b25a55643d4ad1e1591279bdb1217e21e92b (diff) | |
download | ruby-7435cf8c5a9799e43c26d9b5d3fa6fb4c99925eb.tar.gz ruby-7435cf8c5a9799e43c26d9b5d3fa6fb4c99925eb.tar.xz ruby-7435cf8c5a9799e43c26d9b5d3fa6fb4c99925eb.zip |
* 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.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 73d55c5e4..199869246 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -454,6 +454,7 @@ class TestProcess < Test::Unit::TestCase assert_equal("fooo\n", io.read) end } + rescue NotImplementedError end def test_fd_inheritance @@ -931,15 +932,16 @@ class TestProcess < Test::Unit::TestCase 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 |