1 /* Test for ungetc bugs. */
9 fputs ("test failed: " #x "\n", stderr); \
15 main (int argc
, char *argv
[])
23 fp
= fopen (name
, "w");
29 fp
= fopen (name
, "r");
31 assert (getc (fp
) != EOF
);
32 assert ((c
= getc (fp
)) != EOF
);
33 assert (getc (fp
) == EOF
);
34 assert (ungetc (c
, fp
) == c
);
35 assert (feof (fp
) == 0);