Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
576ff4b1
Commit
576ff4b1
authored
Jan 11, 2009
by
Dylan Smith
Committed by
Alexandre Julliard
Jan 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Tested EM_CHARFROMPOS with position outside of control.
parent
55d9e958
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
3 deletions
+37
-3
editor.c
dlls/riched20/tests/editor.c
+37
-3
No files found.
dlls/riched20/tests/editor.c
View file @
576ff4b1
...
...
@@ -5715,17 +5715,51 @@ static void test_EM_CHARFROMPOS(void)
{
HWND
hwnd
;
int
result
;
RECT
rcClient
;
POINTL
point
;
point
.
x
=
0
;
point
.
y
=
5
0
;
point
.
y
=
4
0
;
/* multi-line control inserts CR normally */
hwnd
=
new_richedit
(
NULL
);
result
=
SendMessageA
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"one two three four five six seven"
);
(
LPARAM
)
"one two three four five six seven
\r
eight
"
);
GetClientRect
(
hwnd
,
&
rcClient
);
result
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
ok
(
result
==
34
,
"expected character index of 34 but got %d
\n
"
,
result
);
/* Test with points outside the bounds of the richedit control. */
point
.
x
=
-
1
;
point
.
y
=
40
;
result
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
todo_wine
ok
(
result
==
34
,
"expected character index of 34 but got %d
\n
"
,
result
);
point
.
x
=
1000
;
point
.
y
=
0
;
result
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
todo_wine
ok
(
result
==
33
,
"expected character index of 33 but got %d
\n
"
,
result
);
point
.
x
=
1000
;
point
.
y
=
40
;
result
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
todo_wine
ok
(
result
==
39
,
"expected character index of 39 but got %d
\n
"
,
result
);
point
.
x
=
1000
;
point
.
y
=
-
1
;
result
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
todo_wine
ok
(
result
==
0
,
"expected character index of 0 but got %d
\n
"
,
result
);
point
.
x
=
1000
;
point
.
y
=
rcClient
.
bottom
+
1
;
result
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
todo_wine
ok
(
result
==
34
,
"expected character index of 34 but got %d
\n
"
,
result
);
point
.
x
=
1000
;
point
.
y
=
rcClient
.
bottom
;
result
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
ok
(
result
==
0
,
"expected character index of 0
but got %d
\n
"
,
result
);
todo_wine
ok
(
result
==
39
,
"expected character index of 39
but got %d
\n
"
,
result
);
DestroyWindow
(
hwnd
);
}
...
...
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