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
9bc409cf
Commit
9bc409cf
authored
Dec 16, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Dec 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20/tests: Fix test failures on Win9x, WinMe and Wine in win9x mode.
parent
1a853abe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
15 deletions
+30
-15
editor.c
dlls/riched20/tests/editor.c
+30
-15
No files found.
dlls/riched20/tests/editor.c
View file @
9bc409cf
...
...
@@ -44,6 +44,8 @@ static CHAR string1[MAX_PATH], string2[MAX_PATH], string3[MAX_PATH];
static
HMODULE
hmoduleRichEdit
;
static
int
is_win9x
=
0
;
static
HWND
new_window
(
LPCTSTR
lpClassName
,
DWORD
dwStyle
,
HWND
parent
)
{
HWND
hwnd
;
hwnd
=
CreateWindow
(
lpClassName
,
NULL
,
dwStyle
|
WS_POPUP
|
WS_HSCROLL
|
WS_VSCROLL
...
...
@@ -4911,9 +4913,7 @@ static void test_unicode_conversions(void)
char
bufA
[
64
];
WCHAR
bufW
[
64
];
HWND
hwnd
;
int
is_win9x
,
em_settextex_supported
,
ret
;
is_win9x
=
GetVersion
()
&
0x80000000
;
int
em_settextex_supported
,
ret
;
#define set_textA(hwnd, wm_set_text, txt) \
do { \
...
...
@@ -5146,8 +5146,12 @@ static void test_EM_GETTEXTLENGTHEX(void)
char
buffer
[
64
]
=
{
0
};
/* single line */
hwnd
=
CreateWindowExA
(
0
,
"RichEdit20W"
,
NULL
,
WS_POPUP
,
0
,
0
,
200
,
60
,
0
,
0
,
0
,
0
);
if
(
!
is_win9x
)
hwnd
=
CreateWindowExA
(
0
,
"RichEdit20W"
,
NULL
,
WS_POPUP
,
0
,
0
,
200
,
60
,
0
,
0
,
0
,
0
);
else
hwnd
=
CreateWindowExA
(
0
,
"RichEdit20A"
,
NULL
,
WS_POPUP
,
0
,
0
,
200
,
60
,
0
,
0
,
0
,
0
);
ok
(
hwnd
!=
0
,
"CreateWindowExA error %u
\n
"
,
GetLastError
());
gtl
.
flags
=
GTL_NUMCHARS
|
GTL_PRECISE
|
GTL_USECRLF
;
...
...
@@ -5191,8 +5195,12 @@ static void test_EM_GETTEXTLENGTHEX(void)
DestroyWindow
(
hwnd
);
/* multi line */
hwnd
=
CreateWindowExA
(
0
,
"RichEdit20W"
,
NULL
,
WS_POPUP
|
ES_MULTILINE
,
0
,
0
,
200
,
60
,
0
,
0
,
0
,
0
);
if
(
!
is_win9x
)
hwnd
=
CreateWindowExA
(
0
,
"RichEdit20W"
,
NULL
,
WS_POPUP
|
ES_MULTILINE
,
0
,
0
,
200
,
60
,
0
,
0
,
0
,
0
);
else
hwnd
=
CreateWindowExA
(
0
,
"RichEdit20A"
,
NULL
,
WS_POPUP
|
ES_MULTILINE
,
0
,
0
,
200
,
60
,
0
,
0
,
0
,
0
);
ok
(
hwnd
!=
0
,
"CreateWindowExA error %u
\n
"
,
GetLastError
());
gtl
.
flags
=
GTL_NUMCHARS
|
GTL_PRECISE
|
GTL_USECRLF
;
...
...
@@ -5431,8 +5439,12 @@ static void test_undo_coalescing(void)
char
buffer
[
64
]
=
{
0
};
/* multi-line control inserts CR normally */
hwnd
=
CreateWindowExA
(
0
,
"RichEdit20W"
,
NULL
,
WS_POPUP
|
ES_MULTILINE
,
0
,
0
,
200
,
60
,
0
,
0
,
0
,
0
);
if
(
!
is_win9x
)
hwnd
=
CreateWindowExA
(
0
,
"RichEdit20W"
,
NULL
,
WS_POPUP
|
ES_MULTILINE
,
0
,
0
,
200
,
60
,
0
,
0
,
0
,
0
);
else
hwnd
=
CreateWindowExA
(
0
,
"RichEdit20A"
,
NULL
,
WS_POPUP
|
ES_MULTILINE
,
0
,
0
,
200
,
60
,
0
,
0
,
0
,
0
);
ok
(
hwnd
!=
0
,
"CreateWindowExA error %u
\n
"
,
GetLastError
());
result
=
SendMessage
(
hwnd
,
EM_CANUNDO
,
0
,
0
);
...
...
@@ -5652,16 +5664,16 @@ static void test_word_movement(void)
/* Make sure the behaviour is the same with a unicode richedit window,
* and using unicode functions. */
SetLastError
(
0xdeadbeef
);
hwnd
=
CreateWindowW
(
RICHEDIT_CLASS20W
,
NULL
,
ES_MULTILINE
|
WS_POPUP
|
WS_HSCROLL
|
WS_VSCROLL
|
WS_VISIBLE
,
0
,
0
,
200
,
60
,
NULL
,
NULL
,
hmoduleRichEdit
,
NULL
);
if
(
!
hwnd
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
if
(
is_win9x
)
{
win_skip
(
"Needed unicode functions are not implemented
\n
"
);
skip
(
"Cannot test with unicode richedit window
\n
"
);
return
;
}
hwnd
=
CreateWindowW
(
RICHEDIT_CLASS20W
,
NULL
,
ES_MULTILINE
|
WS_POPUP
|
WS_HSCROLL
|
WS_VSCROLL
|
WS_VISIBLE
,
0
,
0
,
200
,
60
,
NULL
,
NULL
,
hmoduleRichEdit
,
NULL
);
/* Test with a custom word break procedure that uses X as the delimiter. */
result
=
SendMessageW
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
textW
);
ok
(
result
==
TRUE
,
"Failed to clear the text.
\n
"
);
...
...
@@ -5829,6 +5841,9 @@ START_TEST( editor )
* RICHED20.DLL, so the linker doesn't actually link to it. */
hmoduleRichEdit
=
LoadLibrary
(
"RICHED20.DLL"
);
ok
(
hmoduleRichEdit
!=
NULL
,
"error: %d
\n
"
,
(
int
)
GetLastError
());
is_win9x
=
GetVersion
()
&
0x80000000
;
test_WM_CHAR
();
test_EM_FINDTEXT
();
test_EM_GETLINE
();
...
...
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