summaryrefslogtreecommitdiff
path: root/test/etc
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-04 06:04:38 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-04 06:04:38 +0000
commit205e542a89c6150edf440d53f82267163526fb93 (patch)
treecc794577d912931d6acedae2d53142a30bd66f4a /test/etc
parenta76288cfc730e0a556e298e7316c5526e292095a (diff)
avoid infinite loop on FreeBSD 6.3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/etc')
-rw-r--r--test/etc/test_etc.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/etc/test_etc.rb b/test/etc/test_etc.rb
index 37adab6..5725569 100644
--- a/test/etc/test_etc.rb
+++ b/test/etc/test_etc.rb
@@ -82,14 +82,22 @@ class TestEtc < Test::Unit::TestCase
end
def test_getgrgid
+ groups = []
Etc.group do |s|
+ groups << s
+ end
+ groups.each do |s|
assert_equal(s, Etc.getgrgid(s.gid))
assert_equal(s, Etc.getgrgid) if Etc.getlogin == s.name
end
end
def test_getgrnam
+ groups = []
Etc.group do |s|
+ groups << s
+ end
+ groups.each do |s|
assert_equal(s, Etc.getgrnam(s.name))
end
end