unlink ("test-fflush.txt");
return 1;
}
+ if (ftell (f) != 5)
+ {
+ fputs ("ftell result is wrong after fseek.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
/* Check that file reading resumes at correct location. */
if (fgetc (f) != '6')
{
unlink ("test-fflush.txt");
return 1;
}
+ if (ftell (f) != 6)
+ {
+ fputs ("ftell result is wrong after fseek.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
/* Check that file reading resumes at correct location. */
if (fgetc (f) != '7')
{