summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-09 11:58:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-09 11:58:25 +0000
commit84ae8dc9f3d02d70efd692a02b42fa35b5e27edf (patch)
treea0fdfcedb69a09f0e44c81f040600deea1b21caa /test
parent51d863e06ac1071570bf8a2c2668a6a415f31f93 (diff)
test_process.rb (test_maxgroups): add assertions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index f300444ecc..d68aef624e 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1512,8 +1512,13 @@ class TestProcess < Test::Unit::TestCase
end
def test_maxgroups
- assert_kind_of(Integer, Process.maxgroups)
+ max = Process.maxgroups
rescue NotImplementedError
+ else
+ assert_kind_of(Integer, max)
+ gs = Process.groups
+ assert_operator(gs.size, :<=, max)
+ assert_raise(ArgumentError) {Process.groups = gs * (max / gs.size + 1)}
end
def test_geteuid