Austin Lund : comctl32/tests: DateTimePicker and MonthCalendar controls only support Gregorian calendar.
Alexandre Julliard
julliard at winehq.org
Thu Aug 19 11:44:05 CDT 2010
Module: wine
Branch: master
Commit: 8fdb1bec125a1b7d2d711a684a7da4cd2b23cb3b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8fdb1bec125a1b7d2d711a684a7da4cd2b23cb3b
Author: Austin Lund <austin.lund at gmail.com>
Date: Thu Aug 19 15:50:04 2010 +1000
comctl32/tests: DateTimePicker and MonthCalendar controls only support Gregorian calendar.
---
dlls/comctl32/tests/datetime.c | 18 +++++++++++++-----
dlls/comctl32/tests/monthcal.c | 13 ++++++++++++-
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/tests/datetime.c b/dlls/comctl32/tests/datetime.c
index 83f8e03..8b902ba 100644
--- a/dlls/comctl32/tests/datetime.c
+++ b/dlls/comctl32/tests/datetime.c
@@ -659,7 +659,7 @@ static void test_dtm_set_and_get_system_time(void)
static void test_wm_set_get_text(void)
{
static const CHAR a_str[] = "a";
- char buff[16], time[16];
+ CHAR buff[16], time[16], caltype[3];
HWND hWnd;
LRESULT ret;
@@ -677,11 +677,19 @@ static void test_wm_set_get_text(void)
ok(ret != 0, "Expected non-zero return value\n");
SetLastError(0xdeadbeef);
- ret = GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL, time, sizeof(time));
+ ret = GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_ICALENDARTYPE, caltype, 3);
if (ret == 0)
- skip("GetDateFormat failed, returned %ld, error %d\n", ret, GetLastError());
- else
- ok(!strcmp(buff, time), "Expected %s, got %s\n", time, buff);
+ 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);
+ ret = GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL, time, sizeof(time));
+ if (ret == 0)
+ skip("GetDateFormat failed, returned %ld, error %d\n", ret, GetLastError());
+ else
+ ok(!strcmp(buff, time), "Expected %s, got %s\n", time, buff);
+ }
DestroyWindow(hWnd);
}
diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c
index f3db522..52e16c3 100644
--- a/dlls/comctl32/tests/monthcal.c
+++ b/dlls/comctl32/tests/monthcal.c
@@ -781,9 +781,20 @@ static void test_currdate(void)
static void test_firstDay(void)
{
int res, fday, i, prev;
- CHAR b[128];
+ CHAR b[128], caltype[3];
LCID lcid = LOCALE_USER_DEFAULT;
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);
More information about the wine-cvs
mailing list