Commit d11c758f authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

riched20/tests: Add negative indentation display test.

parent 4ee81394
...@@ -601,6 +601,7 @@ static void test_EM_POSFROMCHAR(void) ...@@ -601,6 +601,7 @@ static void test_EM_POSFROMCHAR(void)
POINTL pt; POINTL pt;
LOCALESIGNATURE sig; LOCALESIGNATURE sig;
BOOL rtl; BOOL rtl;
PARAFORMAT2 fmt;
static const char text[] = "aa\n" static const char text[] = "aa\n"
"this is a long line of text that should be longer than the " "this is a long line of text that should be longer than the "
"control's width\n" "control's width\n"
...@@ -727,6 +728,18 @@ static void test_EM_POSFROMCHAR(void) ...@@ -727,6 +728,18 @@ static void test_EM_POSFROMCHAR(void)
SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, -1); SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, -1);
ok(pt.x == 1, "pt.x = %d\n", pt.x); 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); DestroyWindow(hwndRichEdit);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment