From: Rafael Garcia-Suarez Date: Mon, 29 Oct 2007 10:49:13 +0000 (+0000) Subject: Leopard has more standard /etc/passwd files than previous X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8faed52958054bc8caf3982ebc3f742581d1498d;p=p5sagit%2Fp5-mst-13.2.git Leopard has more standard /etc/passwd files than previous versions of darwin. Thanks to David Morel for testing. p4raw-id: //depot/perl@32200 --- diff --git a/t/op/pwent.t b/t/op/pwent.t index 4d9de44..3303f3e 100755 --- a/t/op/pwent.t +++ b/t/op/pwent.t @@ -89,7 +89,8 @@ while () { # 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); - if ($^O eq 'darwin') { + (my $v) = $Config{osvers} =~ /^(\d+)/; + if ($^O eq 'darwin' && $v < 9) { ($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;