mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
avoid infinite loop on FreeBSD 6.3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a76288cfc7
commit
205e542a89
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue