diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 4705dd6..e56c2de 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -7951,6 +7951,34 @@ static void test_EM_SETFONTSIZE(void) DestroyWindow(richedit); } +static void send_ctrl_shift_key(HWND hwnd, UINT key) +{ + hold_key(VK_CONTROL); + hold_key(VK_SHIFT); + SendMessageA(hwnd, WM_KEYDOWN, key, 1); + release_key(VK_CONTROL); + release_key(VK_SHIFT); +} + +static void test_superscript_subscript_shortcut_key(void) +{ + HWND richedit = new_richedit(NULL); + char sometext[] = "Wine Text"; + CHARFORMAT2A cf2; + + ZeroMemory(&cf2, sizeof(cf2)); + cf2.cbSize = sizeof(CHARFORMAT2A); + + SendMessageA(richedit, WM_SETTEXT, 0, (LPARAM)sometext); + + send_ctrl_shift_key(richedit, VK_OEM_PLUS); + + SendMessageA(richedit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); + ok(cf2.dwEffects & CFE_SUPERSCRIPT, "got wrong dwEffects: 0x%08x\n", cf2.dwEffects); + + DestroyWindow(richedit); +} + START_TEST( editor ) { BOOL ret; @@ -8017,6 +8045,7 @@ START_TEST( editor ) test_reset_default_para_fmt(); test_EM_SETREADONLY(); test_EM_SETFONTSIZE(); + test_superscript_subscript_shortcut_key(); /* Set the environment variable WINETEST_RICHED20 to keep windows * responsive and open for 30 seconds. This is useful for debugging.