- FILE * fh;
- char buffer[100];
- TESTCASE( ( fh = fopen( "testfile", "w" ) ) != NULL );
- TESTCASE( fputc( '!', fh ) == '!' );
- TESTCASE( fclose( fh ) == 0 );
- TESTCASE( ( fh = fopen( "testfile", "r" ) ) != NULL );
- TESTCASE( fread( buffer, 1, 1, fh ) == 1 );
- TESTCASE( buffer[0] == '!' );
- TESTCASE( fclose( fh ) == 0 );