Change 31435 by [EMAIL PROTECTED] on 2007/06/21 08:15:24

        Subject: [perl #43273] Enable lib/User/*.t on cygwin 
        From: Reini Urban (via RT) <[EMAIL PROTECTED]>
        Date: Wed, 20 Jun 2007 16:22:48 -0700
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/lib/User/grent.t#5 edit
... //depot/perl/lib/User/pwent.t#6 edit

Differences ...

==== //depot/perl/lib/User/grent.t#5 (text) ====
Index: perl/lib/User/grent.t
--- perl/lib/User/grent.t#4~13980~      2001-12-31 06:29:17.000000000 -0800
+++ perl/lib/User/grent.t       2007-06-21 01:15:24.000000000 -0700
@@ -18,7 +18,8 @@
 }
 
 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 @@
 
 can_ok(__PACKAGE__, 'getgrgid');
 
-my $grent = getgrgid 0;
+my $grent = getgrgid $gid;
 
 is( $grent->name, $grent[0],    'name matches core getgrgid' );
 

==== //depot/perl/lib/User/pwent.t#6 (text) ====
Index: perl/lib/User/pwent.t
--- perl/lib/User/pwent.t#5~16443~      2002-05-07 06:50:35.000000000 -0700
+++ perl/lib/User/pwent.t       2007-06-21 01:15:24.000000000 -0700
@@ -21,6 +21,7 @@
     # 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 }
 }
End of Patch.

Reply via email to