[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/libc/glibc/glibc-2.22/localedata/tst-setlocale.c b/ap/libc/glibc/glibc-2.22/localedata/tst-setlocale.c
new file mode 100644
index 0000000..a09a4de
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/localedata/tst-setlocale.c
@@ -0,0 +1,28 @@
+/* Test case by Jakub Jelinek <jakub@redhat.com>. */
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+
+static int
+do_test (void)
+{
+ char q[30];
+ char *s;
+
+ setlocale (LC_ALL, "");
+ printf ("after setlocale (LC_ALL, \"\"): %s\n", setlocale(LC_NUMERIC, NULL));
+
+ strcpy (q, "de_DE.UTF-8");
+ setlocale (LC_NUMERIC, q);
+ printf ("after setlocale (LC_NUMERIC, \"%s\"): %s\n",
+ q, setlocale(LC_NUMERIC, NULL));
+
+ strcpy (q, "de_DE.ISO-8859-1");
+ s = setlocale (LC_NUMERIC, NULL);
+ printf ("after overwriting string: %s\n", s);
+
+ return strcmp (s, "de_DE.UTF-8") != 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"