* locales/en_US: Add first_weekday and first_workday.
[glibc.git] / localedata / tst-strptime.c
blobb5ab232d7e6287ab074ed089d41087ca238260c7
1 #include <locale.h>
2 #include <time.h>
3 #include <stdio.h>
5 static int
6 do_test (void)
8 if (setlocale (LC_ALL, "vi_VN.TCVN5712-1") == NULL)
10 puts ("cannot set locale");
11 return 1;
13 struct tm tm;
14 /* This is November in Vietnamese encoded using TCVN5712-1. */
15 static const char s[] = "\
16 \x54\x68\xb8\x6e\x67\x20\x6d\xad\xea\x69\x20\x6d\xe9\x74";
17 char *r = strptime (s, "%b", &tm);
18 printf ("r = %p, r-s = %tu, tm.tm_mon = %d\n", r, r - s, tm.tm_mon);
19 return r == NULL || r - s != 14 || tm.tm_mon != 10;
22 #define TEST_FUNCTION do_test ()
23 #include "../test-skeleton.c"