Dmitry Timoshkov : riched20/tests: Add a test to see what richedit class flavours should be available.
Alexandre Julliard
julliard at winehq.org
Wed Feb 16 15:30:24 CST 2022
Module: wine
Branch: master
Commit: d54a0e2bea4548bb5d9c0cca9f918d7c46591e23
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d54a0e2bea4548bb5d9c0cca9f918d7c46591e23
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Wed Feb 16 10:44:30 2022 +0300
riched20/tests: Add a test to see what richedit class flavours should be available.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/riched20/tests/editor.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 85f7c00383a..20bf0358712 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -8994,6 +8994,38 @@ static void test_EM_SELECTIONTYPE(void)
DestroyWindow(hwnd);
}
+static void test_window_classes(void)
+{
+ static const struct
+ {
+ const char *class;
+ BOOL success;
+ } test[] =
+ {
+ { "RichEdit", FALSE },
+ { "RichEdit20A", TRUE },
+ { "RichEdit20W", TRUE },
+ { "RichEdit50A", FALSE },
+ { "RichEdit50W", FALSE }
+ };
+ int i;
+ HWND hwnd;
+
+ for (i = 0; i < sizeof(test)/sizeof(test[0]); i++)
+ {
+ SetLastError(0xdeadbeef);
+ hwnd = CreateWindowExA(0, test[i].class, NULL, WS_POPUP, 0, 0, 0, 0, 0, 0, 0, NULL);
+ todo_wine_if(!strcmp(test[i].class, "RichEdit50A") || !strcmp(test[i].class, "RichEdit50W"))
+ ok(!hwnd == !test[i].success, "CreateWindow(%s) should %s\n",
+ test[i].class, test[i].success ? "succeed" : "fail");
+ if (!hwnd)
+ todo_wine
+ ok(GetLastError() == ERROR_CANNOT_FIND_WND_CLASS, "got %u\n", GetLastError());
+ else
+ DestroyWindow(hwnd);
+ }
+}
+
START_TEST( editor )
{
BOOL ret;
@@ -9003,6 +9035,7 @@ START_TEST( editor )
ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError());
is_lang_japanese = (PRIMARYLANGID(GetSystemDefaultLangID()) == LANG_JAPANESE);
+ test_window_classes();
test_WM_CHAR();
test_EM_FINDTEXT(FALSE);
test_EM_FINDTEXT(TRUE);
More information about the wine-cvs
mailing list