mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_process.rb: test if success?
* test/ruby/test_process.rb (test_rlimit_value): should not use magic number 0, which may not be EXIT_SUCCESS. use `success?` instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
38c3ba2fa5
commit
956745eee2
1 changed files with 2 additions and 2 deletions
|
@ -131,7 +131,7 @@ class TestProcess < Test::Unit::TestCase
|
|||
exit false
|
||||
end
|
||||
End
|
||||
assert_not_equal(0, s.exitstatus)
|
||||
assert_not_predicate(s, :success?)
|
||||
s = run_in_child(<<-'End')
|
||||
cur, max = Process.getrlimit(:NOFILE)
|
||||
Process.setrlimit(:NOFILE, [max-10, cur].min)
|
||||
|
@ -141,7 +141,7 @@ class TestProcess < Test::Unit::TestCase
|
|||
exit false
|
||||
end
|
||||
End
|
||||
assert_not_equal(0, s.exitstatus)
|
||||
assert_not_predicate(s, :success?)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue