Hi.
Could anyone with Win7 access run this for me and send a log back?
This test requires Russian localization support to be installed.
Thanks.
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index fe54907..27da991 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -122,6 +122,11 @@ static void test_GetLocaleInfoA(void)
LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT);
char buffer[BUFFER_SIZE];
char expected[BUFFER_SIZE];
+ /* nominative names */
+ char months[12][80];
+ /* genitive names */
+ char months_genitive[12][80];
+ int i;
ok(lcid == 0x409, "wrong LCID calculated - %d\n", lcid);
@@ -181,6 +186,36 @@ static void test_GetLocaleInfoA(void)
ret = GetLocaleInfoA(lcid, NUO|LOCALE_SDAYNAME1, buffer, 10);
ok(ret == 7, "Expected ret == 7, got %d, error %d\n", ret, GetLastError());
ok(!strcmp(buffer, "Monday"), "Expected 'Monday', got '%s'\n", buffer);
+
+ /* test genitive month names */
+ ret = GetLocaleInfo(MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL), SORT_DEFAULT),
+ LOCALE_SMONTHNAME1, buffer, COUNTOF(buffer));
+ if(ret == 0)
+ {
+ win_skip("Failed to retrieve data for LANG_RUSSIAN\n");
+ return;
+ }
+ buffer[0] = '\0';
+ ret = GetLocaleInfo(MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL), SORT_DEFAULT),
+ LOCALE_RETURN_GENITIVE_NAMES, buffer, COUNTOF(buffer));
+ ok(ret == 0, "Expected 0, got %d\n", ret);
+ trace("LOCALE_RETURN_GENITIVE_NAMES %s\n", buffer);
+ for(i = 0; i<12; i++)
+ {
+ months[i][0] = '\0';
+ ret = GetLocaleInfo(MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL), SORT_DEFAULT),
+ LOCALE_SMONTHNAME1 + i, months[i], COUNTOF(months[i]));
+ ok(ret == lstrlenA(months[i]), "Expected length, got %d, length %d\n", ret, lstrlenA(months[i]));
+ trace("nominative(i) %s\n", months[i]);
+
+ months_genitive[i][0] = '\0';
+ ret = GetLocaleInfo(MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL), SORT_DEFAULT),
+ LOCALE_RETURN_GENITIVE_NAMES | (LOCALE_SMONTHNAME1 + i),
+ months_genitive[i], COUNTOF(months_genitive[i]));
+ ok(ret == lstrlenA(months_genitive[i]), "Expected length, got %d, length %d\n",
+ ret, lstrlenA(months_genitive[i]));
+ trace("genitive(i) %s\n", months_genitive[i]);
+ }
}
static void test_GetTimeFormatA(void)
diff --git a/include/winnls.h b/include/winnls.h
index 50d6389..61a3e4d 100644
--- a/include/winnls.h
+++ b/include/winnls.h
@@ -151,9 +151,10 @@ extern "C" {
#define LCID_ALTERNATE_SORTS 0x4
/* Locale flags */
-#define LOCALE_NOUSEROVERRIDE 0x80000000
-#define LOCALE_USE_CP_ACP 0x40000000
-#define LOCALE_RETURN_NUMBER 0x20000000
+#define LOCALE_NOUSEROVERRIDE 0x80000000
+#define LOCALE_USE_CP_ACP 0x40000000
+#define LOCALE_RETURN_NUMBER 0x20000000
+#define LOCALE_RETURN_GENITIVE_NAMES 0x10000000
/* Locale information types */
#define LOCALE_ILANGUAGE 0x0001