summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-10-29 10:49:13 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-10-29 10:49:13 +0000
commit8faed52958054bc8caf3982ebc3f742581d1498d (patch)
tree846002235101f611b196ceacead4957e0ca8d91e /t
parent1632ad18fc14f06bcf903568971ba8c88c7bb88b (diff)
downloadperl-8faed52958054bc8caf3982ebc3f742581d1498d.tar.gz
Leopard has more standard /etc/passwd files than previous
versions of darwin. Thanks to David Morel for testing. p4raw-id: //depot/perl@32200
Diffstat (limited to 't')
-rwxr-xr-xt/op/pwent.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/op/pwent.t b/t/op/pwent.t
index 4d9de4490f..3303f3e41e 100755
--- a/t/op/pwent.t
+++ b/t/op/pwent.t
@@ -89,7 +89,8 @@ while (<PW>) {
# 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;