15 #define test(n, ret, fmt, args) \
18 if (vprintf (fmt, ap2) != ret) \
21 #include "vprintf-1.c"
34 #define test(n, ret, fmt, args) \
36 #include "vprintf-1.c"
42 test (0, 5, "hello", (0));
43 test (1, 6, "hello\n", (1));
44 test (2, 1, "a", (2));
46 test (4, 5, "%s", (4, "hello"));
47 test (5, 6, "%s", (5, "hello\n"));
48 test (6, 1, "%s", (6, "a"));
49 test (7, 0, "%s", (7, ""));
50 test (8, 1, "%c", (8, 'x'));
51 test (9, 7, "%s\n", (9, "hello\n"));
52 test (10, 2, "%d\n", (10, 0));