1 #undef G_DISABLE_ASSERT
4 #ifdef GLIB_COMPILATION
5 #undef GLIB_COMPILATION
14 /* These only work in the POSIX locale, maybe C too -
15 * type POSIX into the program to check them
17 char* posix_tests [] = {
30 int main(int argc, char** argv)
36 loc = setlocale(LC_ALL,"");
38 g_print("\nLocale set to %s\n", loc);
40 g_print("\nLocale unchanged\n");
44 while (fgets(input, 1023, stdin))
48 g_print("Enter a date to parse and press enter, or type `POSIX':\n");
52 if (strcmp(input,"POSIX\n") == 0)
54 char** s = posix_tests;
56 g_date_set_parse(d, *s);
58 g_print("POSIXy parse test `%s' ...", *s);
62 g_print(" failed.\n");
68 g_date_strftime(buf,100," parsed `%x' (%B %d %Y)\n",
78 g_date_set_parse(d, input);
82 g_print("Parse failed.\n");
88 g_date_strftime(buf,100,"Parsed: `%x' (%B %d %Y)\n",