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
6aa853ae
Commit
6aa853ae
authored
Jan 22, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/edit: Fix EM_SETWORDBREAKPROC return value.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8247c13a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
0 deletions
+65
-0
edit.c
dlls/comctl32/tests/edit.c
+32
-0
edit.c
dlls/user32/edit.c
+1
-0
edit.c
dlls/user32/tests/edit.c
+32
-0
No files found.
dlls/comctl32/tests/edit.c
View file @
6aa853ae
...
...
@@ -2982,6 +2982,37 @@ static void test_EM_GETLINE(void)
}
}
static
int
CALLBACK
test_wordbreak_procA
(
char
*
text
,
int
current
,
int
length
,
int
code
)
{
return
-
1
;
}
static
void
test_wordbreak_proc
(
void
)
{
EDITWORDBREAKPROCA
proc
;
LRESULT
ret
;
HWND
hwnd
;
hwnd
=
create_editcontrol
(
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
proc
=
(
void
*
)
SendMessageA
(
hwnd
,
EM_GETWORDBREAKPROC
,
0
,
0
);
ok
(
proc
==
NULL
,
"Unexpected wordbreak proc %p.
\n
"
,
proc
);
ret
=
SendMessageA
(
hwnd
,
EM_SETWORDBREAKPROC
,
0
,
(
LPARAM
)
test_wordbreak_procA
);
ok
(
ret
==
1
,
"Unexpected return value %ld.
\n
"
,
ret
);
proc
=
(
void
*
)
SendMessageA
(
hwnd
,
EM_GETWORDBREAKPROC
,
0
,
0
);
ok
(
proc
==
test_wordbreak_procA
,
"Unexpected wordbreak proc %p.
\n
"
,
proc
);
ret
=
SendMessageA
(
hwnd
,
EM_SETWORDBREAKPROC
,
0
,
0
);
ok
(
ret
==
1
,
"Unexpected return value %ld.
\n
"
,
ret
);
proc
=
(
void
*
)
SendMessageA
(
hwnd
,
EM_GETWORDBREAKPROC
,
0
,
0
);
ok
(
proc
==
NULL
,
"Unexpected wordbreak proc %p.
\n
"
,
proc
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
edit
)
{
ULONG_PTR
ctx_cookie
;
...
...
@@ -3022,6 +3053,7 @@ START_TEST(edit)
test_EM_GETHANDLE
();
test_paste
();
test_EM_GETLINE
();
test_wordbreak_proc
();
UnregisterWindowClasses
();
...
...
dlls/user32/edit.c
View file @
6aa853ae
...
...
@@ -4839,6 +4839,7 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B
case
EM_SETWORDBREAKPROC
:
EDIT_EM_SetWordBreakProc
(
es
,
(
void
*
)
lParam
);
result
=
1
;
break
;
case
EM_GETWORDBREAKPROC
:
...
...
dlls/user32/tests/edit.c
View file @
6aa853ae
...
...
@@ -2999,6 +2999,37 @@ static void test_EM_GETLINE(void)
}
}
static
int
CALLBACK
test_wordbreak_procA
(
char
*
text
,
int
current
,
int
length
,
int
code
)
{
return
-
1
;
}
static
void
test_wordbreak_proc
(
void
)
{
EDITWORDBREAKPROCA
proc
;
LRESULT
ret
;
HWND
hwnd
;
hwnd
=
create_editcontrol
(
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
proc
=
(
void
*
)
SendMessageA
(
hwnd
,
EM_GETWORDBREAKPROC
,
0
,
0
);
ok
(
proc
==
NULL
,
"Unexpected wordbreak proc %p.
\n
"
,
proc
);
ret
=
SendMessageA
(
hwnd
,
EM_SETWORDBREAKPROC
,
0
,
(
LPARAM
)
test_wordbreak_procA
);
ok
(
ret
==
1
,
"Unexpected return value %ld.
\n
"
,
ret
);
proc
=
(
void
*
)
SendMessageA
(
hwnd
,
EM_GETWORDBREAKPROC
,
0
,
0
);
ok
(
proc
==
test_wordbreak_procA
,
"Unexpected wordbreak proc %p.
\n
"
,
proc
);
ret
=
SendMessageA
(
hwnd
,
EM_SETWORDBREAKPROC
,
0
,
0
);
ok
(
ret
==
1
,
"Unexpected return value %ld.
\n
"
,
ret
);
proc
=
(
void
*
)
SendMessageA
(
hwnd
,
EM_GETWORDBREAKPROC
,
0
,
0
);
ok
(
proc
==
NULL
,
"Unexpected wordbreak proc %p.
\n
"
,
proc
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
edit
)
{
BOOL
b
;
...
...
@@ -3034,6 +3065,7 @@ START_TEST(edit)
test_EM_GETHANDLE
();
test_paste
();
test_EM_GETLINE
();
test_wordbreak_proc
();
UnregisterWindowClasses
();
}
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