1 #include <stdio.h>
2 #include <stdarg.h>
3 #include <string.h>
4
WriteFrmtd(char * format,...)5 static void WriteFrmtd(char *format, ...)
6 {
7 va_list args;
8
9 va_start(args, format);
10 vprintf(format, args);
11 va_end(args);
12 }
13
vprintf_entry(void)14 static int vprintf_entry(void)
15 {
16 WriteFrmtd("vprintf test:%s-%d-%c %.02f 0x%x\n","2021" ,8 ,'1' ,3.14 ,0xff);
17 return 0;
18 }
19
20 #include <utest.h>
test_vprintf(void)21 static void test_vprintf(void)
22 {
23 uassert_int_equal(vprintf_entry(), 0);
24 }
testcase(void)25 static void testcase(void)
26 {
27 UTEST_UNIT_RUN(test_vprintf);
28 }
29 UTEST_TC_EXPORT(testcase, "posix.stdio_h.vprintf.c", RT_NULL, RT_NULL, 10);
30
31