5 main (int argc
, char *argv
[])
12 n
= swprintf (buf
, sizeof (buf
) / sizeof (buf
[0]), L
"Hello %s", "world");
15 printf ("incorrect return value: %d instead of 11\n", n
);
19 if (wcscmp (buf
, L
"Hello world") != 0)
21 printf ("incorrect string: L\"%ls\" instead of L\"Hello world\"\n", buf
);
26 n
= swprintf (buf
, sizeof (buf
) / sizeof (buf
[0]), L
"Is this >%g< 3.1?",
30 printf ("incorrect return value: %d instead of 18\n", n
);
34 if (wcscmp (buf
, L
"Is this >3.1< 3.1?") != 0)
36 printf ("incorrect string: L\"%ls\" instead of L\"Is this >3.1< 3.1?\"\n",