Fixing \G bug by Francois Desarmenien
[p5sagit/p5-mst-13.2.git] / t / op / pwent.t
index 1365588..4151ef2 100755 (executable)
@@ -9,9 +9,9 @@ BEGIN {
 
     $where = $PW;
 
-    if (-x "/usr/bin/nidump") {
+    if (-x "/usr/bin/nidump") { # nidump is not just NeXT/OpenStep
        if (open(PW, "nidump passwd . |")) {
-           $where = "NetInfo";
+           $where = "NetInfo passwd";
        } else {
            print "1..0\n";
            exit 0;
@@ -35,6 +35,7 @@ my %seen;
 
 while (<PW>) {
     chomp;
+    next if /^\+/; # ignore NIS includes
     my @s = split /:/;
     my ($name_s, $passwd_s, $uid_s, $gid_s, $gcos_s, $home_s, $shell_s) = @s;
     if (@s) {
@@ -78,7 +79,7 @@ foreach (sort keys %seen) {
     if ($times > 1) {
        # Multiply defined users are rarely intentional.
        local $" = ", ";
-       warn "# User '$_' defined multiple times in $where, lines: @{$seen{$_}}.\n";
+       print "# User '$_' defined multiple times in $where, lines: @{$seen{$_}}.\n";
        delete $suspect{$_};
     }
 }