[ID 20011126.150] t/op/pack patch to fix Useless use of unpack in void context at...
[p5sagit/p5-mst-13.2.git] / t / op / grent.t
index 27c9427..68569e9 100755 (executable)
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, "../lib" if -d "../lib";
+    @INC = '../lib';
     eval {my @n = getgrgid 0};
     if ($@ && $@ =~ /(The \w+ function is unimplemented)/) {
        print "1..0 # Skip: $1\n";
@@ -67,7 +67,10 @@ my $tst = 1;
 my %perfect;
 my %seen;
 
+print "# where $where\n";
+
 setgrent();
+
 while (<GR>) {
     chomp;
     # LIMIT -1 so that groups with no users don't fall off
@@ -115,7 +118,9 @@ while (<GR>) {
 
 endgrent();
 
-if (keys %perfect == 0) {
+print "# max = $max, n = $n, perfect = ", scalar keys %perfect, "\n";
+
+if (keys %perfect == 0 && $n) {
     $max++;
     print <<EOEX;
 #