12 { "de_DE.ISO-8859-1", "|-12,34 EUR|-12,34|" },
13 { "da_DK.ISO-8859-1", "|kr. -12,34|-12,34|" },
14 { "zh_TW.EUC-TW", "|-NT$12.34|-12.34|" },
15 { "sv_SE.ISO-8859-1", "|-12,34 kr|-12,34|" },
16 { "nl_NL.UTF-8", "|\u20ac -12,34|-12,34|" },
18 #define ntests (sizeof (tests) / sizeof (tests[0]))
25 for (int i
= 0; i
< ntests
; ++i
)
28 if (setlocale (LC_ALL
, tests
[i
].locale
) == NULL
)
30 printf ("failed to set locale %s\n", tests
[i
].locale
);
34 strfmon (buf
, sizeof (buf
), "|%n|%!n|", -12.34, -12.34);
35 int fail
= strcmp (buf
, tests
[i
].expected
) != 0;
36 printf ("%s%s\n", buf
, fail
? " *** FAIL ***" : "");
42 #define TEST_FUNCTION do_test ()
43 #include "../test-skeleton.c"