riched20/tests: Actually copy something to the clipboard.

Previously this test was relying on a quirk - pasting with an empty
clipboard generated an undo event.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2016-02-29 12:06:23 +00:00 committed by Alexandre Julliard
parent d00254842b
commit 9a934a3198
1 changed files with 3 additions and 2 deletions

View File

@ -3281,11 +3281,12 @@ static void test_EM_SETUNDOLIMIT(void)
SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"x");
cr.cpMin = 0;
cr.cpMax = 1;
cr.cpMax = -1;
SendMessageA(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr);
SendMessageA(hwndRichEdit, WM_COPY, 0, 0);
/*Load "x" into the clipboard. Paste is an easy, undo'able operation.
also, multiple pastes don't combine like WM_CHAR would */
SendMessageA(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr);
/* first case - check the default */
SendMessageA(hwndRichEdit,EM_EMPTYUNDOBUFFER, 0,0);