- /* Test ftell after ungetc without read. */
- ASSERT (fseek (stdin, 0, SEEK_CUR) == 0);
- ASSERT (ftell (stdin) == 3);
-
- ch = ungetc ('~', stdin);
- ASSERT (ch == '~');
- ASSERT (ftell (stdin) == 2);
+ if (2 < argc)
+ {
+ if (FUNC_UNGETC_BROKEN)
+ {
+ fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+ stderr);
+ return 77;
+ }
+ /* Test ftell after ungetc without read. */
+ ASSERT (fseek (stdin, 0, SEEK_CUR) == 0);
+ ASSERT (ftell (stdin) == 3);
+
+ ch = ungetc ('~', stdin);
+ ASSERT (ch == '~');
+ ASSERT (ftell (stdin) == 2);
+ }