summaryrefslogtreecommitdiff
path: root/test/locale/tst-xlocale1.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:29:21 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:31:55 +0200
commit99ef2719fb3d703fe38c4113cd7f5adec516dd3a (patch)
tree2c1f77cb41b60ccbf8faa77a3640491a3546b546 /test/locale/tst-xlocale1.c
parent543308f6c46cf2edf8a524bc9c631e472570fe72 (diff)
test: remove test suite
The test suite is now a developed in a separate git repository. See here: http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git The test suite should be just like every other software compiled with the cross-toolchain. In the past strange problems where found when the test suite got build in the toolchain creation step.
Diffstat (limited to 'test/locale/tst-xlocale1.c')
-rw-r--r--test/locale/tst-xlocale1.c75
1 files changed, 0 insertions, 75 deletions
diff --git a/test/locale/tst-xlocale1.c b/test/locale/tst-xlocale1.c
deleted file mode 100644
index 297c9ad7e..000000000
--- a/test/locale/tst-xlocale1.c
+++ /dev/null
@@ -1,75 +0,0 @@
-#include <locale.h>
-#include <stdio.h>
-#include <string.h>
-
-
-static struct
-{
- const char *locale;
- const char *str1;
- const char *str2;
- int result;
-} tests[] =
- {
- { "C", "TRANSLIT", "translit", 0 },
- { "de_DE.ISO-8859-1", "TRANSLIT", "translit", 0 },
- { "de_DE.ISO-8859-1", "TRANSLIT", "trÄnslit", -1 },
- { "de_DE.UTF-8", "TRANSLIT", "translit", 0 },
- { "de_DE.ISO-8859-1", "ä", "Ä", 1 }
- };
-#define ntests (sizeof (tests) / sizeof (tests[0]))
-
-
-int
-main (void)
-{
- size_t cnt;
- int result = 0;
- locale_t loc = newlocale (1 << LC_ALL, "C", NULL);
-
- for (cnt = 0; cnt < ntests; ++cnt)
- {
- int r;
-
- if (setlocale (LC_ALL, tests[cnt].locale) == NULL)
- {
- printf ("cannot set locale \"%s\": %m\n", tests[cnt].locale);
- result = 1;
- continue;
- }
-
- printf ("\nstrcasecmp_l (\"%s\", \"%s\", loc)\n",
- tests[cnt].str1, tests[cnt].str2);
-
- r = strcasecmp_l (tests[cnt].str1, tests[cnt].str2, loc);
- if (tests[cnt].result == 0)
- {
- if (r != 0)
- {
- printf ("\"%s\" and \"%s\" expected to be the same, result %d\n",
- tests[cnt].str1, tests[cnt].str2, r);
- result = 1;
- }
- }
- else if (tests[cnt].result < 0)
- {
- if (r >= 0)
- {
- printf ("\"%s\" expected to be smaller than \"%s\", result %d\n",
- tests[cnt].str1, tests[cnt].str2, r);
- result = 1;
- }
- }
- else
- {
- if (r <= 0)
- {
- printf ("\"%s\" expected to be larger than \"%s\", result %d\n",
- tests[cnt].str1, tests[cnt].str2, r);
- result = 1;
- }
- }
- }
-
- return result;
-}