Update.
1999-06-08 Ulrich Drepper <drepper@cygnus.com> * grp/tst_fgetgrent.c (write_users): Correctly generate long line.
This commit is contained in:
parent
f535dd028f
commit
4707ba3dde
@ -1,3 +1,7 @@
|
||||
1999-06-08 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* grp/tst_fgetgrent.c (write_users): Correctly generate long line.
|
||||
|
||||
1999-06-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||
|
||||
* grp/Makefile: Add rules for tst_fgetgrent.
|
||||
|
@ -34,7 +34,7 @@ write_users (FILE *f, int large_pos, int pos)
|
||||
{
|
||||
/* we need more than 2048 bytes for proper testing. */
|
||||
for (i = 0; i < 500; i++)
|
||||
fprintf (f, ",user%03d", i);
|
||||
fprintf (f, "%suser%03d", i == 0 ? ":" : ",", i);
|
||||
}
|
||||
fprintf (f, "\n");
|
||||
|
||||
@ -44,7 +44,7 @@ static void
|
||||
write_group (const char *filename, int pos)
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
|
||||
f = fopen (filename, "w");
|
||||
fprintf (f, "one:x:1:one");
|
||||
write_users (f, pos, 1);
|
||||
@ -64,7 +64,7 @@ test_entry (const char *name, gid_t gid, struct group *g)
|
||||
errors++;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ((g->gr_gid == gid) && (strcmp (g->gr_name, name) == 0))
|
||||
printf ("Ok: %s: %d\n", g->gr_name, g->gr_gid);
|
||||
else
|
||||
@ -93,7 +93,7 @@ test_fgetgrent (const char *filename)
|
||||
fclose (f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@ -112,6 +112,6 @@ main (int argc, char *argv[])
|
||||
test_fgetgrent (file);
|
||||
|
||||
remove (file);
|
||||
|
||||
|
||||
return (errors != 0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user