9 if (ferror (stdin
) != 0)
11 fputs ("error bit set for stdin at startup\n", stdout
);
14 if (fgets (buf
, sizeof buf
, stdin
) != buf
)
16 fputs ("fgets with existing input has problem\n", stdout
);
19 if (ferror (stdin
) != 0)
21 fputs ("error bit set for stdin after setup\n", stdout
);
24 if (fputc ('a', stdin
) != EOF
)
26 fputs ("fputc to stdin does not terminate with an error\n", stdout
);
29 if (ferror (stdin
) == 0)
31 fputs ("error bit not set for stdin after fputc\n", stdout
);
35 if (ferror (stdin
) != 0)
37 fputs ("error bit set for stdin after clearerr\n", stdout
);
43 #define TEST_FUNCTION do_test ()
44 #include "../test-skeleton.c"