This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Safeguard against unimplemented functions in pwuid.t and grent.t
[perl5.git] / t / op / grent.t
index 9b06f11..c9d3797 100755 (executable)
@@ -3,6 +3,11 @@
 BEGIN {
     chdir 't' if -d 't';
     unshift @INC, "../lib" if -d "../lib";
+    eval {my @n = getgrgid 0};
+    if ($@ && $@ =~ /(The \w+ function is unimplemented)/) {
+       print "1..0 # Skip: $1\n";
+       exit 0;
+    }
     eval { require Config; import Config; };
     my $reason;
     if ($Config{'i_grp'} ne 'define') {