1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/etc/test_etc.rb (test_getpwuid): fix for users whose uid is

shared.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-07-29 04:21:32 +00:00
parent e7d2f303b7
commit f783b8d204
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Tue Jul 29 13:17:03 2008 NARUSE, Yui <naruse@ruby-lang.org>
* test/etc/test_etc.rb (test_getpwuid): fix for users whose uid is
shared.
Tue Jul 29 05:37:53 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_find_file_ext, rb_find_file): converts Windows style path

View file

@ -28,9 +28,9 @@ class TestEtc < Test::Unit::TestCase
end
def test_getpwuid
passwd = []
Etc.passwd {|s| passwd << s }
passwd.each do |s|
passwd = {}
Etc.passwd {|s| passwd[s.uid] = s unless passwd[s.uid] }
passwd.values.each do |s|
assert_equal(s, Etc.getpwuid(s.uid))
assert_equal(s, Etc.getpwuid) if Etc.getlogin == s.name
end