* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
[glibc.git] / localedata / tst-strptime.c
blob4ee4fcb78d96ade9811ea8573311154d5d4928da
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 = %ju, 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"