Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1.
[glibc.git] / localedata / tst-setlocale2.c
bloba4eb11fb37af952cb13179c1504d21b1f3b12ce8
1 #include <ctype.h>
2 #include <locale.h>
3 #include <stdio.h>
4 #include <wctype.h>
7 static int
8 do_test (void)
10 const char *loc = "de_DE.ISO-8859-1";
11 if (setlocale (LC_ALL, loc) == NULL)
13 printf ("cannot set %s locale\n", loc);
14 return 1;
16 printf ("selected locale %s\n", loc);
18 wint_t win = 0xe4;
19 wint_t wex = 0xc4;
20 wint_t wch = towupper (win);
21 if (wch != wex)
23 printf ("towupper(%x) = %x, expected %x\n", win, wch, wex);
24 return 1;
26 wch = toupper (win);
27 if (wch != wex)
29 printf ("toupper(%x) = %x, expected %x\n", win, wch, wex);
30 return 1;
33 win = 0x69;
34 wex = 0x49;
35 wch = towupper (win);
36 if (wch != wex)
38 printf ("towupper(%x) = %x, expected %x\n", win, wch, wex);
39 return 1;
41 wch = toupper (win);
42 if (wch != wex)
44 printf ("toupper(%x) = %x, expected %x\n", win, wch, wex);
45 return 1;
48 loc = "tr_TR.ISO-8859-9";
49 if (setlocale (LC_ALL, loc) == NULL)
51 printf ("cannot set %s locale\n", loc);
52 return 1;
54 printf ("selected locale %s\n", loc);
56 win = 0x69;
57 wex = 0x130;
58 wch = towupper (win);
59 if (wch != wex)
61 printf ("towupper(%x) = %x, expected %x\n", win, wch, wex);
62 return 1;
64 wch = toupper (win);
65 wex = 0xdd;
66 if (wch != wex)
68 printf ("toupper(%x) = %x, expected %x\n", win, wch, wex);
69 return 1;
72 return 0;
75 #define TEST_FUNCTION do_test ()
76 #include "../test-skeleton.c"