Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
31951a09
Commit
31951a09
authored
Oct 22, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Oct 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Added tests for EM_POSFROMCHAR for pos around end of text.
parent
4c3d27df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
editor.c
dlls/riched20/tests/editor.c
+17
-0
No files found.
dlls/riched20/tests/editor.c
View file @
31951a09
...
...
@@ -529,6 +529,7 @@ static void test_EM_POSFROMCHAR(void)
LRESULT
result
;
unsigned
int
height
=
0
;
int
xpos
=
0
;
POINTL
pt
;
static
const
char
text
[]
=
"aa
\n
"
"this is a long line of text that should be longer than the "
"control's width
\n
"
...
...
@@ -636,6 +637,22 @@ static void test_EM_POSFROMCHAR(void)
"EM_POSFROMCHAR reports x=%hd, expected value less than %d
\n
"
,
(
signed
short
)(
LOWORD
(
result
)),
xpos
);
}
SendMessage
(
hwndRichEdit
,
WM_HSCROLL
,
SB_LINELEFT
,
0
);
/* Test around end of text that doesn't end in a newline. */
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"12345678901234"
);
SendMessage
(
hwndRichEdit
,
EM_POSFROMCHAR
,
(
WPARAM
)
&
pt
,
SendMessage
(
hwndRichEdit
,
WM_GETTEXTLENGTH
,
0
,
0
)
-
1
);
ok
(
pt
.
x
>
1
,
"pt.x = %d
\n
"
,
pt
.
x
);
xpos
=
pt
.
x
;
SendMessage
(
hwndRichEdit
,
EM_POSFROMCHAR
,
(
WPARAM
)
&
pt
,
SendMessage
(
hwndRichEdit
,
WM_GETTEXTLENGTH
,
0
,
0
));
todo_wine
ok
(
pt
.
x
>
xpos
,
"pt.x = %d
\n
"
,
pt
.
x
);
xpos
=
pt
.
x
;
SendMessage
(
hwndRichEdit
,
EM_POSFROMCHAR
,
(
WPARAM
)
&
pt
,
SendMessage
(
hwndRichEdit
,
WM_GETTEXTLENGTH
,
0
,
0
)
+
1
);
ok
(
pt
.
x
==
xpos
,
"pt.x = %d
\n
"
,
pt
.
x
);
DestroyWindow
(
hwndRichEdit
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment