From: Jactry Zeng Subject: [PATCH v4 2/2] riched20/tests: Add more tests for testing EM_GETTEXTEX with OLE objects. Message-Id: <20210608054550.121693-2-jzeng@codeweavers.com> Date: Tue, 8 Jun 2021 13:45:50 +0800 In-Reply-To: <20210608054550.121693-1-jzeng@codeweavers.com> References: <20210608054550.121693-1-jzeng@codeweavers.com> Signed-off-by: Jactry Zeng --- dlls/riched20/tests/richole.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index a8c48994613..d5a9844b1fc 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -3403,6 +3403,26 @@ static void test_InsertObject(void) ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); todo_wine ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer)); + gettextex.flags = GT_NOHIDDENTEXT; + memset(buffer, 0, sizeof(buffer)); + result = SendMessageW(hwnd, EM_GETTEXTEX, (WPARAM)&gettextex, (LPARAM)buffer); + ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); + todo_wine ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer)); + + gettextex.flags = GT_SELECTION; + memset(buffer, 0, sizeof(buffer)); + SendMessageW(hwnd, EM_SETSEL, 0, -1); + result = SendMessageW(hwnd, EM_GETTEXTEX, (WPARAM)&gettextex, (LPARAM)buffer); + ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); + todo_wine ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer)); + + expected_string = L"abc d efg"; + gettextex.flags = GT_USECRLF; + memset(buffer, 0, sizeof(buffer)); + result = SendMessageW(hwnd, EM_GETTEXTEX, (WPARAM)&gettextex, (LPARAM)buffer); + ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); + ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer)); + expected_stringA = "abc d efg"; memset(bufferA, 0, sizeof(bufferA)); SendMessageA(hwnd, EM_SETSEL, 0, -1); -- 2.30.2