9 char fmtbuf[100], stdbuf[100];
12 vsnprint(fmtbuf, sizeof fmtbuf, fmt, arg);
16 vsnprint(stdbuf, sizeof stdbuf, fmt, arg);
19 if(strcmp(fmtbuf, stdbuf) != 0)
20 print("fmt %s: fmt=\"%s\" std=\"%s\"\n", fmt, fmtbuf, stdbuf);
22 print("fmt %s: %s\n", fmt, fmtbuf);
27 main(int argc, char *argv[])
30 test("%f", 3.14159e10);
31 test("%f", 3.14159e-10);
34 test("%e", 3.14159e10);
35 test("%e", 3.14159e-10);
38 test("%g", 3.14159e10);
39 test("%g", 3.14159e-10);
46 test("%f", 3.1415927/4);
48 test("%20.10d", 12345);
49 test("%0.10d", 12345);