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
b095ade9
Commit
b095ade9
authored
Sep 19, 2007
by
Clinton Stimpson
Committed by
Alexandre Julliard
Sep 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add tests for text limit behavior.
parent
05cb03bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
editor.c
dlls/riched20/tests/editor.c
+55
-0
No files found.
dlls/riched20/tests/editor.c
View file @
b095ade9
...
...
@@ -1108,6 +1108,61 @@ static void test_EM_EXLIMITTEXT(void)
result
=
strcmp
(
buffer
,
"A"
);
ok
(
0
==
result
,
"got string =
\"
%s
\"\n
"
,
buffer
);
/* WM_SETTEXT not limited */
textlimit
=
10
;
memset
(
text
,
'W'
,
textlimit
);
text
[
textlimit
]
=
0
;
SendMessage
(
hwndRichEdit
,
EM_EXLIMITTEXT
,
0
,
textlimit
-
5
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
i
=
strlen
(
buffer
);
todo_wine
{
ok
(
10
==
i
,
"expected 10 chars
\n
"
);
}
i
=
SendMessage
(
hwndRichEdit
,
EM_GETLIMITTEXT
,
0
,
0
);
todo_wine
{
ok
(
10
==
i
,
"EM_EXLIMITTEXT: expected: %d, actual: %d
\n
"
,
10
,
i
);
}
/* try inserting more text at end */
i
=
SendMessage
(
hwndRichEdit
,
WM_CHAR
,
'A'
,
0
);
ok
(
0
==
i
,
"WM_CHAR wasn't processed"
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
i
=
strlen
(
buffer
);
todo_wine
{
ok
(
10
==
i
,
"expected 10 chars, got %i
\n
"
,
i
);
}
i
=
SendMessage
(
hwndRichEdit
,
EM_GETLIMITTEXT
,
0
,
0
);
todo_wine
{
ok
(
10
==
i
,
"EM_EXLIMITTEXT: expected: %d, actual: %d
\n
"
,
10
,
i
);
}
/* try inserting text at beginning */
SendMessage
(
hwndRichEdit
,
EM_SETSEL
,
0
,
0
);
i
=
SendMessage
(
hwndRichEdit
,
WM_CHAR
,
'A'
,
0
);
ok
(
0
==
i
,
"WM_CHAR wasn't processed"
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
i
=
strlen
(
buffer
);
todo_wine
{
ok
(
10
==
i
,
"expected 10 chars, got %i
\n
"
,
i
);
}
i
=
SendMessage
(
hwndRichEdit
,
EM_GETLIMITTEXT
,
0
,
0
);
todo_wine
{
ok
(
10
==
i
,
"EM_EXLIMITTEXT: expected: %d, actual: %d
\n
"
,
10
,
i
);
}
/* WM_CHAR is limited */
textlimit
=
1
;
SendMessage
(
hwndRichEdit
,
EM_EXLIMITTEXT
,
0
,
textlimit
);
SendMessage
(
hwndRichEdit
,
EM_SETSEL
,
0
,
-
1
);
/* select everything */
i
=
SendMessage
(
hwndRichEdit
,
WM_CHAR
,
'A'
,
0
);
ok
(
0
==
i
,
"WM_CHAR wasn't processed"
);
i
=
SendMessage
(
hwndRichEdit
,
WM_CHAR
,
'A'
,
0
);
ok
(
0
==
i
,
"WM_CHAR wasn't processed"
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
i
=
strlen
(
buffer
);
ok
(
1
==
i
,
"expected 1 chars, got %i instead
\n
"
,
i
);
DestroyWindow
(
hwndRichEdit
);
}
...
...
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