comctl32/tests: DateTimePicker and MonthCalendar controls only support Gregorian calendar.
This commit is contained in:
parent
a4435e3adc
commit
8fdb1bec12
|
@ -659,7 +659,7 @@ static void test_dtm_set_and_get_system_time(void)
|
||||||
static void test_wm_set_get_text(void)
|
static void test_wm_set_get_text(void)
|
||||||
{
|
{
|
||||||
static const CHAR a_str[] = "a";
|
static const CHAR a_str[] = "a";
|
||||||
char buff[16], time[16];
|
CHAR buff[16], time[16], caltype[3];
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
LRESULT ret;
|
LRESULT ret;
|
||||||
|
|
||||||
|
@ -676,12 +676,20 @@ static void test_wm_set_get_text(void)
|
||||||
ok(strcmp(buff, a_str) != 0, "Expected text to change, got %s\n", buff);
|
ok(strcmp(buff, a_str) != 0, "Expected text to change, got %s\n", buff);
|
||||||
ok(ret != 0, "Expected non-zero return value\n");
|
ok(ret != 0, "Expected non-zero return value\n");
|
||||||
|
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
|
ret = GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_ICALENDARTYPE, caltype, 3);
|
||||||
|
if (ret == 0)
|
||||||
|
skip("Must know local calendar type (%x)\n", GetLastError());
|
||||||
|
else if (atoi(caltype) != CAL_GREGORIAN)
|
||||||
|
skip("DateTimePicker Control only supports Gregorian calendar (type: %s)\n", caltype);
|
||||||
|
else {
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL, time, sizeof(time));
|
ret = GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL, time, sizeof(time));
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
skip("GetDateFormat failed, returned %ld, error %d\n", ret, GetLastError());
|
skip("GetDateFormat failed, returned %ld, error %d\n", ret, GetLastError());
|
||||||
else
|
else
|
||||||
ok(!strcmp(buff, time), "Expected %s, got %s\n", time, buff);
|
ok(!strcmp(buff, time), "Expected %s, got %s\n", time, buff);
|
||||||
|
}
|
||||||
|
|
||||||
DestroyWindow(hWnd);
|
DestroyWindow(hWnd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -781,9 +781,20 @@ static void test_currdate(void)
|
||||||
static void test_firstDay(void)
|
static void test_firstDay(void)
|
||||||
{
|
{
|
||||||
int res, fday, i, prev;
|
int res, fday, i, prev;
|
||||||
CHAR b[128];
|
CHAR b[128], caltype[3];
|
||||||
LCID lcid = LOCALE_USER_DEFAULT;
|
LCID lcid = LOCALE_USER_DEFAULT;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
|
LRESULT ret;
|
||||||
|
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
|
ret = GetLocaleInfoA(lcid, LOCALE_ICALENDARTYPE, caltype, 3);
|
||||||
|
if (ret == 0) {
|
||||||
|
skip("Must know local calendar type (%x)\n", GetLastError());
|
||||||
|
return;
|
||||||
|
} else if (atoi(caltype) != CAL_GREGORIAN) {
|
||||||
|
skip("MonthCalendar Control only supports Gregorian calendar (type: %s)\n", caltype);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
hwnd = create_monthcal_control(0);
|
hwnd = create_monthcal_control(0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue