- CompareFormats( "%d.%m.%Y", m_locale->GetInfo(wxLOCALE_SHORT_DATE_FMT) );
- CompareFormats( "%a %d %b %Y", m_locale->GetInfo(wxLOCALE_LONG_DATE_FMT) );
- CompareFormats( "%a %d %b %Y %H:%M:%S %Z",
+#ifdef __GLIBC__
+ // Versions of glibc up to 2.7 wrongly used periods for French locale
+ // separator.
+#if __GLIBC__ > 2 || __GLIBC_MINOR__ >= 8
+ static const char *FRENCH_DATE_FMT = "%d/%m/%Y";
+#else
+ static const char *FRENCH_DATE_FMT = "%d.%m.%Y";
+#endif
+ static const char *FRENCH_LONG_DATE_FMT = "%a %d %b %Y";
+ static const char *FRENCH_DATE_TIME_FMT = "%a %d %b %Y %H:%M:%S %Z";
+#else
+ static const char *FRENCH_DATE_FMT = "%d/%m/%Y";
+ static const char *FRENCH_LONG_DATE_FMT = "%A %d %B %Y";
+#ifdef __WXOSX__
+ static const char *FRENCH_DATE_TIME_FMT = "%A %d %B %Y %H:%M:%S";
+#else
+ static const char *FRENCH_DATE_TIME_FMT = "%d/%m/%Y %H:%M:%S";
+#endif
+#endif
+
+ WX_ASSERT_EQUAL_FORMAT( "French short date", FRENCH_DATE_FMT,
+ m_locale->GetInfo(wxLOCALE_SHORT_DATE_FMT) );
+ WX_ASSERT_EQUAL_FORMAT( "French long date", FRENCH_LONG_DATE_FMT,
+ m_locale->GetInfo(wxLOCALE_LONG_DATE_FMT) );
+ WX_ASSERT_EQUAL_FORMAT( "French date and time", FRENCH_DATE_TIME_FMT,