p4raw-id: //depot/cfgperl@6050
my %perfect;
my %seen;
+setgrent();
while (<GR>) {
chomp;
my @s = split /:/;
$n++;
}
+endgrent();
+
if (keys %perfect == 0) {
$max++;
print <<EOEX;
my @gr1;
-endgrent();
setgrent();
for (1..$max) {
my $gr = scalar getgrent();
last unless defined $gr;
push @gr1, $gr;
}
+endgrent();
my @gr2;
-endgrent();
setgrent();
for (1..$max) {
my ($gr) = (getgrent());
last unless defined $gr;
push @gr2, $gr;
}
+endgrent();
print "not " unless "@gr1" eq "@gr2";
print "ok ", $tst++, "\n";
my %perfect;
my %seen;
+setpwent();
while (<PW>) {
chomp;
my @s = split /:/;
}
$n++;
}
+endpwent();
if (keys %perfect == 0) {
$max++;
my @pw1;
-endpwent();
setpwent();
for (1..$max) {
my $pw = scalar getpwent();
last unless defined $pw;
push @pw1, $pw;
}
+endpwent();
my @pw2;
-endpwent();
setpwent();
for (1..$max) {
my ($pw) = (getpwent());
last unless defined $pw;
push @pw2, $pw;
}
+endpwent();
print "not " unless "@pw1" eq "@pw2";
print "ok ", $tst++, "\n";