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
bb4e3866
Commit
bb4e3866
authored
Oct 17, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Oct 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Test to see if wrapping happens with redraw disabled.
parent
a959f7d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
editor.c
dlls/riched20/tests/editor.c
+21
-1
No files found.
dlls/riched20/tests/editor.c
View file @
bb4e3866
...
...
@@ -5484,7 +5484,7 @@ static void test_word_wrap(void)
POINTL
point
=
{
0
,
60
};
/* This point must be below the first line */
const
char
*
text
=
"Must be long enough to test line wrapping"
;
DWORD
dwCommonStyle
=
WS_VISIBLE
|
WS_POPUP
|
WS_VSCROLL
|
ES_MULTILINE
;
int
res
,
pos
;
int
res
,
pos
,
lines
;
/* Test the effect of WS_HSCROLL and ES_AUTOHSCROLL styles on wrapping
* when specified on window creation and set later. */
...
...
@@ -5495,6 +5495,8 @@ static void test_word_wrap(void)
ok
(
res
,
"WM_SETTEXT failed.
\n
"
);
pos
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
ok
(
pos
,
"pos=%d indicating no word wrap when it is expected.
\n
"
,
pos
);
lines
=
SendMessage
(
hwnd
,
EM_GETLINECOUNT
,
0
,
0
);
ok
(
lines
>
1
,
"Line was expected to wrap (lines=%d).
\n
"
,
lines
);
SetWindowLongW
(
hwnd
,
GWL_STYLE
,
dwCommonStyle
|
WS_HSCROLL
|
ES_AUTOHSCROLL
);
pos
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
...
...
@@ -5509,6 +5511,8 @@ static void test_word_wrap(void)
ok
(
res
,
"WM_SETTEXT failed.
\n
"
);
pos
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
ok
(
!
pos
,
"pos=%d indicating word wrap when none is expected.
\n
"
,
pos
);
lines
=
SendMessage
(
hwnd
,
EM_GETLINECOUNT
,
0
,
0
);
ok
(
lines
==
1
,
"Line wasn't expected to wrap (lines=%d)."
,
lines
);
SetWindowLongW
(
hwnd
,
GWL_STYLE
,
dwCommonStyle
);
pos
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
...
...
@@ -5552,6 +5556,22 @@ static void test_word_wrap(void)
pos
=
SendMessage
(
hwnd
,
EM_CHARFROMPOS
,
0
,
(
LPARAM
)
&
point
);
ok
(
pos
,
"pos=%d indicating no word wrap when it is expected.
\n
"
,
pos
);
DestroyWindow
(
hwnd
);
/* Test to see if wrapping happens with redraw disabled. */
hwnd
=
CreateWindow
(
RICHEDIT_CLASS
,
NULL
,
dwCommonStyle
,
0
,
0
,
400
,
80
,
NULL
,
NULL
,
hmoduleRichEdit
,
NULL
);
ok
(
hwnd
!=
NULL
,
"error: %d
\n
"
,
(
int
)
GetLastError
());
SendMessage
(
hwnd
,
WM_SETREDRAW
,
FALSE
,
0
);
res
=
SendMessage
(
hwnd
,
EM_REPLACESEL
,
FALSE
,
(
LPARAM
)
text
);
ok
(
res
,
"EM_REPLACESEL failed.
\n
"
);
lines
=
SendMessage
(
hwnd
,
EM_GETLINECOUNT
,
0
,
0
);
ok
(
lines
==
1
,
"Line wasn't expected to wrap (lines=%d).
\n
"
,
lines
);
MoveWindow
(
hwnd
,
0
,
0
,
200
,
80
,
FALSE
);
lines
=
SendMessage
(
hwnd
,
EM_GETLINECOUNT
,
0
,
0
);
todo_wine
ok
(
lines
>
1
,
"Line was expected to wrap (lines=%d).
\n
"
,
lines
);
SendMessage
(
hwnd
,
WM_SETREDRAW
,
TRUE
,
0
);
DestroyWindow
(
hwnd
);
}
static
void
test_auto_yscroll
(
void
)
...
...
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