]> git.ipfire.org Git - thirdparty/glibc.git/blame - localedata/tst-setlocale.c
advisories: Add Reported-By
[thirdparty/glibc.git] / localedata / tst-setlocale.c
CommitLineData
9a0fe6a8
UD
1#include <locale.h>
2#include <stdio.h>
3#include <string.h>
4
29955b5d
AS
5static int
6do_test (void)
9a0fe6a8
UD
7{
8 char q[30];
9 char *s;
10
11 setlocale (LC_ALL, "");
12 printf ("after setlocale (LC_ALL, \"\"): %s\n", setlocale(LC_NUMERIC, NULL));
13
14 strcpy (q, "de_DE.UTF-8");
15 setlocale (LC_NUMERIC, q);
16 printf ("after setlocale (LC_NUMERIC, \"%s\"): %s\n",
17 q, setlocale(LC_NUMERIC, NULL));
18
19 strcpy (q, "de_DE.ISO-8859-1");
20 s = setlocale (LC_NUMERIC, NULL);
21 printf ("after overwriting string: %s\n", s);
22
23 return strcmp (s, "de_DE.UTF-8") != 0;
24}
29955b5d
AS
25
26#define TEST_FUNCTION do_test ()
27#include "../test-skeleton.c"