Paul Vriens : kernel32/tests: Fix some failures on win9x.
Alexandre Julliard
julliard at winehq.org
Mon Oct 6 09:35:16 CDT 2008
Module: wine
Branch: master
Commit: 32af90d53ab9bf907a6790a6d0ca9d191384b6d6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=32af90d53ab9bf907a6790a6d0ca9d191384b6d6
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Mon Oct 6 13:33:27 2008 +0200
kernel32/tests: Fix some failures on win9x.
---
dlls/kernel32/tests/locale.c | 44 ++++++++++++++++++++++++++++-------------
1 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index da7a97d..0c6bd92 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -2196,25 +2196,41 @@ static void test_EnumDateFormatsA(void)
trace("EnumDateFormatsA 0\n");
date_fmt_buf[0] = 0;
+ SetLastError(0xdeadbeef);
ret = EnumDateFormatsA(enum_datetime_procA, lcid, 0);
- ok(ret, "EnumDateFormatsA(0) error %d\n", GetLastError());
- trace("%s\n", date_fmt_buf);
- /* test the 1st enumerated format */
- if ((p = strchr(date_fmt_buf, '\n'))) *p = 0;
- ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf));
- ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError());
- ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf);
+ if (!ret && (GetLastError() == ERROR_INVALID_FLAGS))
+ {
+ win_skip("0 for dwFlags is not supported\n");
+ }
+ else
+ {
+ ok(ret, "EnumDateFormatsA(0) error %d\n", GetLastError());
+ trace("%s\n", date_fmt_buf);
+ /* test the 1st enumerated format */
+ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0;
+ ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf));
+ ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError());
+ ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf);
+ }
trace("EnumDateFormatsA LOCALE_USE_CP_ACP\n");
date_fmt_buf[0] = 0;
+ SetLastError(0xdeadbeef);
ret = EnumDateFormatsA(enum_datetime_procA, lcid, LOCALE_USE_CP_ACP);
- ok(ret, "EnumDateFormatsA(LOCALE_USE_CP_ACP) error %d\n", GetLastError());
- trace("%s\n", date_fmt_buf);
- /* test the 1st enumerated format */
- if ((p = strchr(date_fmt_buf, '\n'))) *p = 0;
- ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf));
- ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError());
- ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf);
+ if (!ret && (GetLastError() == ERROR_INVALID_FLAGS))
+ {
+ win_skip("LOCALE_USE_CP_ACP is not supported\n");
+ }
+ else
+ {
+ ok(ret, "EnumDateFormatsA(LOCALE_USE_CP_ACP) error %d\n", GetLastError());
+ trace("%s\n", date_fmt_buf);
+ /* test the 1st enumerated format */
+ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0;
+ ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf));
+ ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError());
+ ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf);
+ }
trace("EnumDateFormatsA DATE_SHORTDATE\n");
date_fmt_buf[0] = 0;
More information about the wine-cvs
mailing list