- FILE * buffer;
- TESTCASE( ( buffer = freopen( testfile, "wb", stdout ) ) != NULL );
-#include "printf_testcases.incl"
- TESTCASE( fclose( buffer ) == 0 );
- char readbuffer[1000];
- TESTCASE( ( buffer = fopen( testfile, "rb" ) ) != NULL );
- TESTCASE( fread( readbuffer, 1, 1000, buffer ) == 985 );
- TESTCASE( fclose( buffer ) == 0 );
+ FILE * target;
+ TESTCASE( ( target = freopen( testfile, "wb+", stdout ) ) != NULL );
+#include "printf_testcases.h"
+ TESTCASE( fclose( target ) == 0 );