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
d1abf27f
Commit
d1abf27f
authored
Apr 07, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Apr 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add tests for edit controls and VK_RETURN.
parent
e91de395
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
0 deletions
+70
-0
edit.c
dlls/user32/tests/edit.c
+70
-0
No files found.
dlls/user32/tests/edit.c
View file @
d1abf27f
...
...
@@ -1638,6 +1638,75 @@ static void test_undo(void)
DestroyWindow
(
hwEdit
);
}
static
void
test_enter
(
void
)
{
HWND
hwEdit
;
LONG
r
;
char
buffer
[
16
];
/* multiline */
hwEdit
=
create_editcontrol
(
ES_MULTILINE
,
0
);
r
=
get_edit_style
(
hwEdit
);
ok
(
ES_MULTILINE
==
r
,
"Wrong style expected 0x%x got: 0x%x
\n
"
,
ES_MULTILINE
,
r
);
/* set text */
r
=
SendMessage
(
hwEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
""
);
ok
(
TRUE
==
r
,
"Expected: %d, got: %d
\n
"
,
TRUE
,
r
);
r
=
SendMessage
(
hwEdit
,
WM_CHAR
,
VK_RETURN
,
0
);
todo_wine
ok
(
1
==
r
,
"Expected: %d, got: %d
\n
"
,
1
,
r
);
/* get text */
buffer
[
0
]
=
0
;
r
=
SendMessage
(
hwEdit
,
WM_GETTEXT
,
16
,
(
LPARAM
)
buffer
);
todo_wine
{
ok
(
2
==
r
,
"Expected: %d, got len %d
\n
"
,
2
,
r
);
ok
(
0
==
strcmp
(
buffer
,
"
\r\n
"
),
"expected
\"\\
r
\\
n
\"
, got
\"
%s
\"\n
"
,
buffer
);
}
DestroyWindow
(
hwEdit
);
/* single line */
hwEdit
=
create_editcontrol
(
0
,
0
);
r
=
get_edit_style
(
hwEdit
);
ok
(
0
==
r
,
"Wrong style expected 0x%x got: 0x%x
\n
"
,
0
,
r
);
/* set text */
r
=
SendMessage
(
hwEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
""
);
ok
(
TRUE
==
r
,
"Expected: %d, got: %d
\n
"
,
TRUE
,
r
);
r
=
SendMessage
(
hwEdit
,
WM_CHAR
,
VK_RETURN
,
0
);
todo_wine
ok
(
1
==
r
,
"Expected: %d, got: %d
\n
"
,
1
,
r
);
/* get text */
buffer
[
0
]
=
0
;
r
=
SendMessage
(
hwEdit
,
WM_GETTEXT
,
16
,
(
LPARAM
)
buffer
);
ok
(
0
==
r
,
"Expected: %d, got len %d
\n
"
,
0
,
r
);
ok
(
0
==
strcmp
(
buffer
,
""
),
"expected
\"\"
, got
\"
%s
\"\n
"
,
buffer
);
DestroyWindow
(
hwEdit
);
/* single line with ES_WANTRETURN */
hwEdit
=
create_editcontrol
(
ES_WANTRETURN
,
0
);
r
=
get_edit_style
(
hwEdit
);
ok
(
ES_WANTRETURN
==
r
,
"Wrong style expected 0x%x got: 0x%x
\n
"
,
ES_WANTRETURN
,
r
);
/* set text */
r
=
SendMessage
(
hwEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
""
);
ok
(
TRUE
==
r
,
"Expected: %d, got: %d
\n
"
,
TRUE
,
r
);
r
=
SendMessage
(
hwEdit
,
WM_CHAR
,
VK_RETURN
,
0
);
todo_wine
ok
(
1
==
r
,
"Expected: %d, got: %d
\n
"
,
1
,
r
);
/* get text */
buffer
[
0
]
=
0
;
r
=
SendMessage
(
hwEdit
,
WM_GETTEXT
,
16
,
(
LPARAM
)
buffer
);
ok
(
0
==
r
,
"Expected: %d, got len %d
\n
"
,
0
,
r
);
ok
(
0
==
strcmp
(
buffer
,
""
),
"expected
\"\"
, got
\"
%s
\"\n
"
,
buffer
);
DestroyWindow
(
hwEdit
);
}
static
void
test_edit_dialog
(
void
)
{
int
r
;
...
...
@@ -1862,6 +1931,7 @@ START_TEST(edit)
test_text_position
();
test_espassword
();
test_undo
();
test_enter
();
test_edit_dialog
();
test_multi_edit_dialog
();
test_wantreturn_edit_dialog
();
...
...
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