5 #include <support/xstdio.h>
7 int stdio_block_read
= 1, stdio_block_write
= 1;
10 main (int argc
, char *argv
[])
15 const char filename
[] = OBJPFX
"bug4.test";
17 while ((i
= getopt (argc
, argv
, "rw")) != -1)
24 stdio_block_write
= 0;
28 f
= fopen (filename
, "w+");
29 for (i
= 0; i
< 9000; ++i
)
33 fwrite ("Where does this text come from?", 1, 31, f
);
35 xfread (buffer
, 1, 31, f
);
36 fwrite (buffer
, 1, 31, stdout
);
40 if (!memcmp (buffer
, "Where does this text come from?", 31))
42 puts ("\nTest succeeded.");
47 puts ("\nTest FAILED!");