From: Reini Urban Date: Wed, 20 Jun 2007 16:22:48 +0000 (-0700) Subject: [perl #43273] Enable lib/User/*.t on cygwin X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d6c666a6c1fd197dca053a9993b287403bbb30e8;p=p5sagit%2Fp5-mst-13.2.git [perl #43273] Enable lib/User/*.t on cygwin From: Reini Urban (via RT) Message-ID: p4raw-id: //depot/perl@31435 --- diff --git a/lib/User/grent.t b/lib/User/grent.t index f7eb2c2..3002b6e 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 d6bd040..f93836f 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 } }