* test/etc/test_etc.rb (TestEtc#test_get{pw,gr}nam): skip entries
start with + sign, which means NIS. these are returned in the case that passwd and group entries in /etc/nsswitch.conf are set to use "nis" explicitly on Debian. fixed #3683 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e8e7ad8192
commit
61a34d625e
@ -1,3 +1,10 @@
|
|||||||
|
Mon Jun 27 01:34:18 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/etc/test_etc.rb (TestEtc#test_get{pw,gr}nam): skip entries
|
||||||
|
start with + sign, which means NIS. these are returned in the
|
||||||
|
case that passwd and group entries in /etc/nsswitch.conf are set
|
||||||
|
to use "nis" explicitly on Debian. fixed #3683
|
||||||
|
|
||||||
Mon Jun 27 00:44:53 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
Mon Jun 27 00:44:53 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (rb_parser_end_seen_p): fix documentation about return
|
* parse.y (rb_parser_end_seen_p): fix documentation about return
|
||||||
|
@ -38,7 +38,9 @@ class TestEtc < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_getpwnam
|
def test_getpwnam
|
||||||
passwd = {}
|
passwd = {}
|
||||||
Etc.passwd {|s| passwd[s.name] ||= s }
|
Etc.passwd do |s|
|
||||||
|
passwd[s.name] ||= s unless /\A\+/ =~ s.name
|
||||||
|
end
|
||||||
passwd.each_value do |s|
|
passwd.each_value do |s|
|
||||||
assert_equal(s, Etc.getpwnam(s.name))
|
assert_equal(s, Etc.getpwnam(s.name))
|
||||||
end
|
end
|
||||||
@ -80,7 +82,7 @@ class TestEtc < Test::Unit::TestCase
|
|||||||
def test_getgrnam
|
def test_getgrnam
|
||||||
groups = {}
|
groups = {}
|
||||||
Etc.group do |s|
|
Etc.group do |s|
|
||||||
groups[s.name] ||= s
|
groups[s.name] ||= s unless /\A\+/ =~ s.name
|
||||||
end
|
end
|
||||||
groups.each_value do |s|
|
groups.each_value do |s|
|
||||||
assert_equal(s, Etc.getgrnam(s.name))
|
assert_equal(s, Etc.getgrnam(s.name))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user