From 99ef2719fb3d703fe38c4113cd7f5adec516dd3a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 28 Oct 2016 20:29:21 +0200 Subject: 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. --- test/time/tst-ftime_l.c | 136 ------------------------------------------------ 1 file changed, 136 deletions(-) delete mode 100644 test/time/tst-ftime_l.c (limited to 'test/time/tst-ftime_l.c') diff --git a/test/time/tst-ftime_l.c b/test/time/tst-ftime_l.c deleted file mode 100644 index 95017f1f8..000000000 --- a/test/time/tst-ftime_l.c +++ /dev/null @@ -1,136 +0,0 @@ -#include -#include -#include -#include -#include -#ifdef __UCLIBC_HAS_XLOCALE__ -#include -#include - - -int -main (void) -{ - locale_t l; - locale_t old; - struct tm tm; - char buf[1000]; - wchar_t wbuf[1000]; - int result = 0; - size_t n; - - l = newlocale (LC_ALL_MASK, "de_DE.ISO-8859-1", NULL); - if (l == NULL) - { - puts ("newlocale failed"); - exit (1); - } - - memset (&tm, '\0', sizeof (tm)); - - tm.tm_year = 102; - tm.tm_mon = 2; - tm.tm_mday = 1; - - if (strftime (buf, sizeof (buf), "%e %^B %Y", &tm) == 0) - { - puts ("initial strftime failed"); - exit (1); - } - if (strcmp (buf, " 1 MARCH 2002") != 0) - { - printf ("initial strftime: expected \"%s\", got \"%s\"\n", - " 1 MARCH 2002", buf); - result = 1; - } - else - printf ("got \"%s\"\n", buf); - - /* Now using the extended locale model. */ - if (strftime_l (buf, sizeof (buf), "%e %^B %Y", &tm, l) == 0) - { - puts ("strftime_l failed"); - result = 1; - } - else if (strcmp (buf, " 1 M\xc4RZ 2002") != 0) - { - printf ("strftime_l: expected \"%s\", got \"%s\"\n", - " 1 M\xc4RZ 2002", buf); - result = 1; - } - else - { - setlocale (LC_ALL, "de_DE.ISO-8859-1"); - printf ("got \"%s\"\n", buf); - setlocale (LC_ALL, "C"); - } - - /* And the wide character version. */ - if (wcsftime_l (wbuf, sizeof (wbuf) / sizeof (wbuf[0]), L"%e %^B %Y", &tm, l) - == 0) - { - puts ("wcsftime_l failed"); - result = 1; - } - else if (wcscmp (wbuf, L" 1 M\x00c4RZ 2002") != 0) - { - printf ("wcsftime_l: expected \"%ls\", got \"%ls\"\n", - L" 1 M\x00c4RZ 2002", wbuf); - result = 1; - } - else - { - setlocale (LC_ALL, "de_DE.ISO-8859-1"); - printf ("got \"%ls\"\n", wbuf); - setlocale (LC_ALL, "C"); - } - - old = uselocale (l); - - n = strftime (buf, sizeof (buf), "%e %^B %Y", &tm); - - /* Switch back. */ - (void) uselocale (old); - - if (n == 0) - { - puts ("strftime after first uselocale failed"); - result = 1; - } - else if (strcmp (buf, " 1 M\xc4RZ 2002") != 0) - { - printf ("strftime in non-C locale: expected \"%s\", got \"%s\"\n", - " 1 M\xc4RZ 2002", buf); - result = 1; - } - else - { - setlocale (LC_ALL, "de_DE.ISO-8859-1"); - printf ("got \"%s\"\n", buf); - setlocale (LC_ALL, "C"); - } - - if (strftime (buf, sizeof (buf), "%e %^B %Y", &tm) == 0) - { - puts ("strftime after second uselocale failed"); - result = 1; - } - else if (strcmp (buf, " 1 MARCH 2002") != 0) - { - printf ("initial strftime: expected \"%s\", got \"%s\"\n", - " 1 MARCH 2002", buf); - result = 1; - } - else - printf ("got \"%s\"\n", buf); - - return result; -} - -#else -int main(void) -{ - puts("Test requires WCHAR support; skipping"); - return 0; -} -#endif -- cgit v1.2.3