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
55771014
Commit
55771014
authored
Jun 18, 2007
by
Lei Zhang
Committed by
Alexandre Julliard
Jun 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add tests for EM_FORMATRANGE.
parent
76d857f3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
editor.c
dlls/riched20/tests/editor.c
+46
-0
No files found.
dlls/riched20/tests/editor.c
View file @
55771014
...
...
@@ -1491,6 +1491,51 @@ static void test_WM_PASTE(void)
DestroyWindow
(
hwndRichEdit
);
}
static
void
test_EM_FORMATRANGE
(
void
)
{
int
r
;
FORMATRANGE
fr
;
HDC
hdc
;
HWND
hwndRichEdit
=
new_richedit
(
NULL
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
haystack
);
hdc
=
GetDC
(
hwndRichEdit
);
ok
(
hdc
!=
NULL
,
"Could not get HDC
\n
"
);
fr
.
hdc
=
fr
.
hdcTarget
=
hdc
;
fr
.
rc
.
top
=
fr
.
rcPage
.
top
=
fr
.
rc
.
left
=
fr
.
rcPage
.
left
=
0
;
fr
.
rc
.
right
=
fr
.
rcPage
.
right
=
GetDeviceCaps
(
hdc
,
HORZRES
);
fr
.
rc
.
bottom
=
fr
.
rcPage
.
bottom
=
GetDeviceCaps
(
hdc
,
VERTRES
);
fr
.
chrg
.
cpMin
=
0
;
fr
.
chrg
.
cpMax
=
20
;
r
=
SendMessage
(
hwndRichEdit
,
EM_FORMATRANGE
,
TRUE
,
(
LPARAM
)
NULL
);
todo_wine
{
ok
(
r
==
31
,
"EM_FORMATRANGE expect %d, got %d
\n
"
,
31
,
r
);
}
r
=
SendMessage
(
hwndRichEdit
,
EM_FORMATRANGE
,
TRUE
,
(
LPARAM
)
&
fr
);
todo_wine
{
ok
(
r
==
20
,
"EM_FORMATRANGE expect %d, got %d
\n
"
,
20
,
r
);
}
fr
.
chrg
.
cpMin
=
0
;
fr
.
chrg
.
cpMax
=
10
;
r
=
SendMessage
(
hwndRichEdit
,
EM_FORMATRANGE
,
TRUE
,
(
LPARAM
)
&
fr
);
todo_wine
{
ok
(
r
==
10
,
"EM_FORMATRANGE expect %d, got %d
\n
"
,
10
,
r
);
}
r
=
SendMessage
(
hwndRichEdit
,
EM_FORMATRANGE
,
TRUE
,
(
LPARAM
)
NULL
);
todo_wine
{
ok
(
r
==
31
,
"EM_FORMATRANGE expect %d, got %d
\n
"
,
31
,
r
);
}
DestroyWindow
(
hwndRichEdit
);
}
static
int
nCallbackCount
=
0
;
static
DWORD
CALLBACK
EditStreamCallback
(
DWORD_PTR
dwCookie
,
LPBYTE
pbBuff
,
...
...
@@ -1808,6 +1853,7 @@ START_TEST( editor )
test_EM_EXSETSEL
();
test_WM_PASTE
();
test_EM_StreamIn_Undo
();
test_EM_FORMATRANGE
();
test_unicode_conversions
();
/* Set the environment variable WINETEST_RICHED20 to keep windows
...
...
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