From: Paul Schinder Date: Thu, 5 Apr 2001 13:21:42 +0000 (-0400) Subject: Re: Not OK: perl v5.6.1 +fools-gold on darwin 1.3 (UNINSTALLED) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=32b4ad3c69185f4ce7cd382edebd968b87bc3e6f;p=p5sagit%2Fp5-mst-13.2.git Re: Not OK: perl v5.6.1 +fools-gold on darwin 1.3 (UNINSTALLED) Message-Id: Mac OS X (Darwin) has extra pwent fields. p4raw-id: //depot/perl@9563 --- diff --git a/t/op/pwent.t b/t/op/pwent.t index 4cccbfe..d811f06 100755 --- a/t/op/pwent.t +++ b/t/op/pwent.t @@ -73,7 +73,12 @@ while () { chomp; # 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; + my ($name_s, $passwd_s, $uid_s, $gid_s, $gcos_s, $home_s, $shell_s); + if ($^O eq 'darwin') { + ($name_s, $passwd_s, $uid_s, $gid_s, $gcos_s, $home_s, $shell_s) = @s[0,1,2,3,7,8,9]; + } else { + ($name_s, $passwd_s, $uid_s, $gid_s, $gcos_s, $home_s, $shell_s) = @s; + } next if /^\+/; # ignore NIS includes if (@s) { push @{ $seen{$name_s} }, $.; @@ -88,7 +93,7 @@ while () { } # In principle we could whine if @s != 7 but do we know enough # of passwd file formats everywhere? - if (@s == 7) { + if (@s == 7 || ($^O eq 'darwin' && @s == 10)) { @n = getpwuid($uid_s); # 'nobody' et al. next unless @n;