10 const char filename[] = "/tmp/bugtest";
12 f = fopen(filename, "w+");
13 for (i=0; i<9000; i++)
16 fwrite ("Where does this text go?", 1, 24, f);
20 for (i=0; i<9000; i++)
24 if ((j = getc(f)) != 'x')
28 printf ("Test FAILED!");
36 fread (buf + 1, 1, 23, f);
38 if (strcmp (buf, "Where does this text go?") != 0)
40 printf ("%s\nTest FAILED!\n", buf);
51 puts ("Test succeeded.");