From: Mark Dickinson Date: Wed, 2 Aug 2000 13:25:07 +0000 (-0400) Subject: [ID 20000802.004] Tests op/grent.t and op/pwent.t fail unnecessarily X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a941e390df32e52f20b358866941870e9b6bfc90;p=p5sagit%2Fp5-mst-13.2.git [ID 20000802.004] Tests op/grent.t and op/pwent.t fail unnecessarily Message-Id: p4raw-id: //depot/perl@6513 --- diff --git a/t/op/grent.t b/t/op/grent.t index d4b0e87..f2b5b9c 100755 --- a/t/op/grent.t +++ b/t/op/grent.t @@ -70,7 +70,8 @@ my %seen; setgrent(); while () { chomp; - my @s = split /:/; + # LIMIT -1 so that groups with no users don't fall off + my @s = split /:/, $_, -1; my ($name_s,$passwd_s,$gid_s,$members_s) = @s; if (@s) { push @{ $seen{$name_s} }, $.; diff --git a/t/op/pwent.t b/t/op/pwent.t index 0f67eb4..c09d7c2 100755 --- a/t/op/pwent.t +++ b/t/op/pwent.t @@ -71,7 +71,8 @@ my %seen; setpwent(); while () { chomp; - my @s = split /:/; + # LIMIT -1 so that users with empty shells don't fall off + my @s = split /:/, $_, -1; my ($name_s, $passwd_s, $uid_s, $gid_s, $gcos_s, $home_s, $shell_s) = @s; next if /^\+/; # ignore NIS includes if (@s) {