10 eval { my @n = getgrgid 0 };
11 $hasgr = 1 unless $@ && $@ =~ /unimplemented/;
12 unless ($hasgr) { print "1..0 # Skip: no getgrgid\n"; exit 0 }
14 $hasgr = 0 unless $Config{'i_grp'} eq 'define';
15 unless ($hasgr) { print "1..0 # Skip: no grp.h\n"; exit 0 }
19 our @grent = getgrgid 0; # This is the function getgrgid.
20 unless (@grent) { print "1..0 # Skip: no gid 0\n"; exit 0 }
29 my $grent = getgrgid 0; # This is the OO getgrgid.
31 print "not " unless $grent->gid == 0;
34 print "not " unless $grent->name == $grent[0];
37 print "not " unless $grent->passwd eq $grent[1];
40 print "not " unless $grent->gid == $grent[2];
43 # Testing pretty much anything else is unportable.