Module: wine Branch: master Commit: 5ac4766476161a01524ea86b507c6c8646a3a160 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5ac4766476161a01524ea86b50...
Author: Hans Leidekker hans@codeweavers.com Date: Thu Mar 2 11:46:53 2017 +0100
riched20/tests: Add a test to show that empty paragraphs get a font size declaration.
Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/riched20/tests/editor.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index bfc61ea..5e71e51 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -3936,6 +3936,25 @@ static void test_EM_STREAMOUT_FONTTBL(void) DestroyWindow(hwndRichEdit); }
+static void test_EM_STREAMOUT_empty_para(void) +{ + HWND hwnd = new_richedit(NULL); + char buf[1024], *p = buf; + EDITSTREAM es; + + SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)""); + + memset(buf, 0, sizeof(buf)); + es.dwCookie = (DWORD_PTR)&p; + es.dwError = 0; + es.pfnCallback = test_WM_SETTEXT_esCallback; + + SendMessageA(hwnd, EM_STREAMOUT, SF_RTF, (LPARAM)&es); + ok((p = strstr(buf, "\pard")) != NULL, "missing \pard\n"); + todo_wine ok(((p = strstr(p, "\fs")) && isdigit(p[3])), "missing \fs\n"); + + DestroyWindow(hwnd); +}
static void test_EM_SETTEXTEX(void) { @@ -8720,6 +8739,7 @@ START_TEST( editor ) test_EM_STREAMIN(); test_EM_STREAMOUT(); test_EM_STREAMOUT_FONTTBL(); + test_EM_STREAMOUT_empty_para(); test_EM_StreamIn_Undo(); test_EM_FORMATRANGE(); test_unicode_conversions();