From: Jarkko Hietaniemi Date: Tue, 2 May 2000 19:26:22 +0000 (+0000) Subject: Use setxxent()/endxxent(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bd055eb9b066b8debf194cc12db404cd438d1936;p=p5sagit%2Fp5-mst-13.2.git Use setxxent()/endxxent(). p4raw-id: //depot/cfgperl@6050 --- diff --git a/t/op/grent.t b/t/op/grent.t index 19096a1..d4b0e87 100755 --- a/t/op/grent.t +++ b/t/op/grent.t @@ -67,6 +67,7 @@ my $tst = 1; my %perfect; my %seen; +setgrent(); while () { chomp; my @s = split /:/; @@ -111,6 +112,8 @@ while () { $n++; } +endgrent(); + if (keys %perfect == 0) { $max++; print <) { chomp; my @s = split /:/; @@ -108,6 +109,7 @@ while () { } $n++; } +endpwent(); if (keys %perfect == 0) { $max++; @@ -138,23 +140,23 @@ print "\n"; 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";