Nikolay Sivov : riched20/tests: Some more EM_SETSEL tests.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jun 17 10:18:10 CDT 2015
Module: wine
Branch: master
Commit: fd4affc0cb1f2eca603a4f954d513ab25ff2f486
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd4affc0cb1f2eca603a4f954d513ab25ff2f486
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Jun 16 17:41:07 2015 +0300
riched20/tests: Some more EM_SETSEL tests.
---
dlls/riched20/tests/editor.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index c3470d4..9adc507 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -4428,7 +4428,7 @@ struct exsetsel_s {
int _getsel_todo_wine;
};
-const struct exsetsel_s exsetsel_tests[] = {
+static const struct exsetsel_s exsetsel_tests[] = {
/* sanity tests */
{5, 10, 10, 5, 10, 0},
{15, 17, 17, 15, 17, 0},
@@ -4452,6 +4452,9 @@ const struct exsetsel_s exsetsel_tests[] = {
/* test if cpMin > cpMax */
{15, 19, 18, 15, 18, 0},
{19, 15, 18, 15, 18, 0},
+ /* cpMin == strlen() && cpMax > cpMin */
+ {17, 18, 18, 17, 18 },
+ {17, 50, 18, 17, 18 },
};
static void check_EM_EXSETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id) {
@@ -4515,6 +4518,7 @@ static void check_EM_SETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id)
static void test_EM_SETSEL(void)
{
+ char buffA[32];
HWND hwndRichEdit = new_richedit(NULL);
int i;
const int num_tests = sizeof(exsetsel_tests)/sizeof(struct exsetsel_s);
@@ -4528,6 +4532,11 @@ static void test_EM_SETSEL(void)
check_EM_SETSEL(hwndRichEdit, &exsetsel_tests[i], i);
}
+ SendMessageA(hwndRichEdit, EM_SETSEL, 17, 18);
+ buffA[0] = 123;
+ SendMessageA(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffA);
+ ok(buffA[0] == 0, "selection text %s\n", buffA);
+
DestroyWindow(hwndRichEdit);
}
More information about the wine-cvs
mailing list