diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 6eb79d5d..b354fa95 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -263,6 +263,7 @@ patch_enable_all () enable_quartz_MediaSeeking_Positions="$1" enable_quartz_Silence_FIXMEs="$1" enable_rasapi32_RasEnumDevicesA="$1" + enable_riched20_Class_Tests="$1" enable_riched20_IText_Interface="$1" enable_rpcrt4_Pipe_Transport="$1" enable_rpcrt4_RpcBindingServerFromClient="$1" @@ -955,6 +956,9 @@ patch_enable () rasapi32-RasEnumDevicesA) enable_rasapi32_RasEnumDevicesA="$2" ;; + riched20-Class_Tests) + enable_riched20_Class_Tests="$2" + ;; riched20-IText_Interface) enable_riched20_IText_Interface="$2" ;; @@ -5664,6 +5668,18 @@ if test "$enable_rasapi32_RasEnumDevicesA" -eq 1; then ) >> "$patchlist" fi +# Patchset riched20-Class_Tests +# | +# | Modified files: +# | * dlls/riched20/tests/editor.c +# | +if test "$enable_riched20_Class_Tests" -eq 1; then + patch_apply riched20-Class_Tests/0001-riched20-tests-Add-a-test-to-see-what-richedit-class.patch + ( + echo '+ { "Dmitry Timoshkov", "riched20/tests: Add a test to see what richedit class flavours should be available.", 1 },'; + ) >> "$patchlist" +fi + # Patchset riched20-IText_Interface # | # | Modified files: diff --git a/patches/riched20-Class_Tests/0001-riched20-tests-Add-a-test-to-see-what-richedit-class.patch b/patches/riched20-Class_Tests/0001-riched20-tests-Add-a-test-to-see-what-richedit-class.patch new file mode 100644 index 00000000..4317dd06 --- /dev/null +++ b/patches/riched20-Class_Tests/0001-riched20-tests-Add-a-test-to-see-what-richedit-class.patch @@ -0,0 +1,63 @@ +From 2113716e5a404208e978343c5a6cf7bf3cf5bda2 Mon Sep 17 00:00:00 2001 +From: Dmitry Timoshkov +Date: Fri, 13 May 2016 16:05:13 +0800 +Subject: riched20/tests: Add a test to see what richedit class flavours should + be available. + +--- + dlls/riched20/tests/editor.c | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c +index ae9c0a5..ef44401 100644 +--- a/dlls/riched20/tests/editor.c ++++ b/dlls/riched20/tests/editor.c +@@ -8337,6 +8337,37 @@ static void test_rtf_specials(void) + DestroyWindow( edit ); + } + ++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 %d\n", GetLastError()); ++ else ++ DestroyWindow(hwnd); ++ } ++} + + START_TEST( editor ) + { +@@ -8347,6 +8378,7 @@ START_TEST( editor ) + ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError()); + is_lang_japanese = (PRIMARYLANGID(GetUserDefaultLangID()) == LANG_JAPANESE); + ++ test_window_classes(); + test_WM_CHAR(); + test_EM_FINDTEXT(FALSE); + test_EM_FINDTEXT(TRUE); +-- +2.8.0 +