Piotr Caban : riched20/tests: Add negative indentation display test.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Apr 18 10:37:03 CDT 2016
Module: wine
Branch: master
Commit: d11c758faf187e9ae52872526a7474ebd4a9795d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d11c758faf187e9ae52872526a7474ebd4a9795d
Author: Piotr Caban <piotr at codeweavers.com>
Date: Mon Apr 18 15:14:33 2016 +0200
riched20/tests: Add negative indentation display test.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/riched20/tests/editor.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index c6444ff..5f4cc05 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -601,6 +601,7 @@ static void test_EM_POSFROMCHAR(void)
POINTL pt;
LOCALESIGNATURE sig;
BOOL rtl;
+ PARAFORMAT2 fmt;
static const char text[] = "aa\n"
"this is a long line of text that should be longer than the "
"control's width\n"
@@ -727,6 +728,18 @@ static void test_EM_POSFROMCHAR(void)
SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, -1);
ok(pt.x == 1, "pt.x = %d\n", pt.x);
+ /* test negative indentation */
+ SendMessageA(hwndRichEdit, WM_SETTEXT, 0,
+ (LPARAM)"{\\rtf1\\pard\\fi-200\\li-200\\f1 TestSomeText\\par}");
+ SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, 0);
+ todo_wine ok(pt.x == 1, "pt.x = %d\n", pt.x);
+
+ fmt.cbSize = sizeof(fmt);
+ SendMessageA(hwndRichEdit, EM_GETPARAFORMAT, 0, (LPARAM)&fmt);
+ ok(fmt.dxStartIndent == -400, "got %d\n", fmt.dxStartIndent);
+ ok(fmt.dxOffset == 200, "got %d\n", fmt.dxOffset);
+ ok(fmt.wAlignment == PFA_LEFT, "got %d\n", fmt.wAlignment);
+
DestroyWindow(hwndRichEdit);
}
More information about the wine-cvs
mailing list