11 size_t l1 = strxfrm (NULL, "ab", 0);
12 size_t l2 = strxfrm (buf, "ab", 1);
13 size_t l3 = strxfrm (buf, "ab", sizeof (buf));
14 if (l3 < sizeof (buf) && strlen (buf) != l3)
16 puts ("C locale l3 test failed");
20 size_t l4 = strxfrm (buf, "ab", l1 + 1);
21 if (l4 < l1 + 1 && strlen (buf) != l4)
23 puts ("C locale l4 test failed");
28 size_t l5 = strxfrm (buf, "ab", l1);
31 puts ("C locale l5 test failed");
35 if (l1 != l2 || l1 != l3 || l1 != l4 || l1 != l5)
37 puts ("C locale retval test failed");
41 if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
43 puts ("setlocale failed");
48 l1 = strxfrm (NULL, "ab", 0);
49 l2 = strxfrm (buf, "ab", 1);
50 l3 = strxfrm (buf, "ab", sizeof (buf));
51 if (l3 < sizeof (buf) && strlen (buf) != l3)
53 puts ("UTF-8 locale l3 test failed");
57 l4 = strxfrm (buf, "ab", l1 + 1);
58 if (l4 < l1 + 1 && strlen (buf) != l4)
60 puts ("UTF-8 locale l4 test failed");
65 l5 = strxfrm (buf, "ab", l1);
68 puts ("UTF-8 locale l5 test failed");
72 if (l1 != l2 || l1 != l3 || l1 != l4 || l1 != l5)
74 puts ("UTF-8 locale retval test failed");
82 #define TEST_FUNCTION do_test ()
83 #include "../test-skeleton.c"