X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fvprintf.c;h=4cb5af39afeaa89e0da5460065bd67849178c864;hb=33ed95661442997b6fcafae16d9e0ab6871b058a;hp=904f791e45e23aae0f0e38c9bb59a6e2d52da7c5;hpb=e72505f84aa8d8730e46d955a2722af361112e4f;p=pdclib diff --git a/functions/stdio/vprintf.c b/functions/stdio/vprintf.c index 904f791..4cb5af3 100644 --- a/functions/stdio/vprintf.c +++ b/functions/stdio/vprintf.c @@ -19,6 +19,8 @@ int vprintf( const char * _PDCLIB_restrict format, _PDCLIB_va_list arg ) #endif #ifdef TEST +#define _PDCLIB_FILEID "stdio/vprintf.c" +#define FPRINTF_FUNCTION #include #include #include <_PDCLIB_test.h> @@ -33,15 +35,12 @@ static int testprintf( FILE * stream, const char * format, ... ) return i; } -#define TESTCASE_SPRINTF( x ) - int main( void ) { FILE * target; - TESTCASE( ( target = freopen( testfile, "wb", stdout ) ) != NULL ); + TESTCASE( ( target = freopen( testfile, "wb+", stdout ) ) != NULL ); #include "printf_testcases.incl" TESTCASE( fclose( target ) == 0 ); -#include "fprintf_reftest.incl" TESTCASE( remove( testfile ) == 0 ); return TEST_RESULTS; }