Re: the remaining bugs in \x escapes (was Re: [PATCH] oct and hex in glorious 64...
[p5sagit/p5-mst-13.2.git] / t / op / pwent.t
index d811f06..fc71f57 100755 (executable)
@@ -3,7 +3,7 @@
 BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
-    eval {my @n = getpwuid 0};
+    eval {my @n = getpwuid 0; setpwent()};
     if ($@ && $@ =~ /(The \w+ function is unimplemented)/) {
        print "1..0 # Skip: $1\n";
        exit 0;
@@ -68,7 +68,10 @@ my $tst = 1;
 my %perfect;
 my %seen;
 
+print "# where $where\n";
+
 setpwent();
+
 while (<PW>) {
     chomp;
     # LIMIT -1 so that users with empty shells don't fall off
@@ -115,9 +118,12 @@ while (<PW>) {
     }
     $n++;
 }
+
 endpwent();
 
-if (keys %perfect == 0) {
+print "# max = $max, n = $n, perfect = ", scalar keys %perfect, "\n";
+
+if (keys %perfect == 0 && $n) {
     $max++;
     print <<EOEX;
 #