diff options
author | Reini Urban <rurban@x-ray.at> | 2007-06-20 09:22:48 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-06-21 08:15:24 +0000 |
commit | d6c666a6c1fd197dca053a9993b287403bbb30e8 (patch) | |
tree | c0c7487bd7c0b831107d9c3eba9b85309f1eeee2 /lib/User | |
parent | c04fcc68f6ae60e0e9ef5b7298775f95a6c9e461 (diff) | |
download | perl-d6c666a6c1fd197dca053a9993b287403bbb30e8.tar.gz |
[perl #43273] Enable lib/User/*.t on cygwin
From: Reini Urban (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-1276-1182381767-470.43273-75-0@perl.org>
p4raw-id: //depot/perl@31435
Diffstat (limited to 'lib/User')
-rw-r--r-- | lib/User/grent.t | 5 | ||||
-rw-r--r-- | lib/User/pwent.t | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/User/grent.t b/lib/User/grent.t index f7eb2c2add..3002b6eec9 100644 --- a/lib/User/grent.t +++ b/lib/User/grent.t @@ -18,7 +18,8 @@ BEGIN { } BEGIN { - our @grent = getgrgid 0; # This is the function getgrgid. + our $gid = $^O ne 'cygwin' ? 0 : 18; + our @grent = getgrgid $gid; # This is the function getgrgid. unless (@grent) { plan skip_all => "no gid 0"; } } @@ -29,7 +30,7 @@ BEGIN { can_ok(__PACKAGE__, 'getgrgid'); -my $grent = getgrgid 0; +my $grent = getgrgid $gid; is( $grent->name, $grent[0], 'name matches core getgrgid' ); diff --git a/lib/User/pwent.t b/lib/User/pwent.t index d6bd040df2..f93836f7ec 100644 --- a/lib/User/pwent.t +++ b/lib/User/pwent.t @@ -21,6 +21,7 @@ BEGIN { # On VMS getpwuid(0) may return [$gid,0] UIC info (which may not exist). # It is better to use the $< uid for testing on VMS instead. if ( $^O eq 'VMS' ) { $uid = $< ; } + if ( $^O eq 'cygwin' ) { $uid = 500 ; } our @pwent = getpwuid $uid; # This is the function getpwuid. unless (@pwent) { print "1..0 # Skip: no uid $uid\n"; exit 0 } } |