Skip to content
Permalink
1475e2012f
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
23 lines (21 sloc) 600 Bytes
#include <locale.h>
#include <time.h>
#include <stdio.h>
static int
do_test (void)
{
if (setlocale (LC_ALL, "vi_VN.TCVN5712-1") == NULL)
{
puts ("cannot set locale");
return 1;
}
struct tm tm;
/* This is November in Vietnamese encoded using TCVN5712-1. */
static const char s[] = "\
\x54\x68\xb8\x6e\x67\x20\x6d\xad\xea\x69\x20\x6d\xe9\x74";
char *r = strptime (s, "%b", &tm);
printf ("r = %p, r-s = %tu, tm.tm_mon = %d\n", r, r - s, tm.tm_mon);
return r == NULL || r - s != 14 || tm.tm_mon != 10;
}
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"