Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- 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);
Dmitry, I expect you realise this already, but the reason for the todo_wine is that our msftedit is a stub that lets riched20 do everything. Ideally we'd split these using PARENTSRC or something.
Signed-off-by: Huw Davies huw@codeweavers.com
Hi Huw,
Thanks for the review.
Huw Davies huw@codeweavers.com wrote:
Dmitry, I expect you realise this already, but the reason for the todo_wine is that our msftedit is a stub that lets riched20 do everything. Ideally we'd split these using PARENTSRC or something.
This patch is from staging where it was part of an old series for a not related to richedit problem. RichEdit50 was just added to array of other richedit classes for the completeness.