// S : tags stdio libc c vararg // S : expect --result valid // S : cc -o test.bc -D_PDCLIB_BUILD -DTEST $file // S : verify -o nofail:malloc test.bc #include #include #include #define _PDCLIB_FILEID "stdio/vsprintf.c" #define _PDCLIB_STRINGIO #include #include #include "_PDCLIB_test.h" static int testprintf( char * s, const char * format, ... ) { int i; va_list arg; va_start( arg, format ); i = vsprintf( s, format, arg ); va_end( arg ); return i; } int main( void ) { char target[100]; #include "printf_testcases.h" return TEST_RESULTS; }