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
74cd5903
Commit
74cd5903
authored
Oct 22, 2007
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Oct 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched32: Skeleton of richedit 1.0 test plus WM_SETTEXT test.
parent
2c742a38
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
170 additions
and
0 deletions
+170
-0
.gitignore
.gitignore
+4
-0
Makefile.in
Makefile.in
+2
-0
configure
configure
+3
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/Makefile.in
+1
-0
Makefile.in
dlls/riched32/tests/Makefile.in
+13
-0
editor.c
dlls/riched32/tests/editor.c
+142
-0
Makefile.in
programs/winetest/Makefile.in
+3
-0
winetest.rc
programs/winetest/winetest.rc
+1
-0
No files found.
.gitignore
View file @
74cd5903
...
...
@@ -380,6 +380,9 @@ dlls/riched20/tests/*.ok
dlls/riched20/tests/riched20_crosstest.exe
dlls/riched20/tests/testlist.c
dlls/riched20/version.res
dlls/riched32/tests/*.ok
dlls/riched32/tests/riched32_crosstest.exe
dlls/riched32/tests/testlist.c
dlls/riched32/version.res
dlls/rpcrt4/librpcrt4.def
dlls/rpcrt4/tests/*.ok
...
...
@@ -732,6 +735,7 @@ programs/winetest/pdh_test.exe
programs/winetest/psapi_test.exe
programs/winetest/quartz_test.exe
programs/winetest/riched20_test.exe
programs/winetest/riched32_test.exe
programs/winetest/rpcrt4_test.exe
programs/winetest/rsabase_test.exe
programs/winetest/rsaenh_test.exe
...
...
Makefile.in
View file @
74cd5903
...
...
@@ -359,6 +359,7 @@ ALL_MAKEFILES = \
dlls/riched20/Makefile
\
dlls/riched20/tests/Makefile
\
dlls/riched32/Makefile
\
dlls/riched32/tests/Makefile
\
dlls/rpcrt4/Makefile
\
dlls/rpcrt4/tests/Makefile
\
dlls/rsabase/Makefile
\
...
...
@@ -733,6 +734,7 @@ dlls/resutils/Makefile: dlls/resutils/Makefile.in dlls/Makedll.rules
dlls/riched20/Makefile
:
dlls/riched20/Makefile.in dlls/Makedll.rules
dlls/riched20/tests/Makefile
:
dlls/riched20/tests/Makefile.in dlls/Maketest.rules
dlls/riched32/Makefile
:
dlls/riched32/Makefile.in dlls/Makedll.rules
dlls/riched32/tests/Makefile
:
dlls/riched32/tests/Makefile.in dlls/Maketest.rules
dlls/rpcrt4/Makefile
:
dlls/rpcrt4/Makefile.in dlls/Makedll.rules
dlls/rpcrt4/tests/Makefile
:
dlls/rpcrt4/tests/Makefile.in dlls/Maketest.rules
dlls/rsabase/Makefile
:
dlls/rsabase/Makefile.in dlls/Makedll.rules
...
...
configure
View file @
74cd5903
...
...
@@ -20916,6 +20916,8 @@ ac_config_files="$ac_config_files dlls/riched20/tests/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/riched32/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/riched32/tests/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/rpcrt4/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/rpcrt4/tests/Makefile"
...
...
@@ -21999,6 +22001,7 @@ do
"dlls/riched20/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/riched20/Makefile" ;;
"dlls/riched20/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/riched20/tests/Makefile" ;;
"dlls/riched32/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/riched32/Makefile" ;;
"dlls/riched32/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/riched32/tests/Makefile" ;;
"dlls/rpcrt4/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/rpcrt4/Makefile" ;;
"dlls/rpcrt4/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/rpcrt4/tests/Makefile" ;;
"dlls/rsabase/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/rsabase/Makefile" ;;
...
...
configure.ac
View file @
74cd5903
...
...
@@ -1775,6 +1775,7 @@ AC_CONFIG_FILES([dlls/resutils/Makefile])
AC_CONFIG_FILES([dlls/riched20/Makefile])
AC_CONFIG_FILES([dlls/riched20/tests/Makefile])
AC_CONFIG_FILES([dlls/riched32/Makefile])
AC_CONFIG_FILES([dlls/riched32/tests/Makefile])
AC_CONFIG_FILES([dlls/rpcrt4/Makefile])
AC_CONFIG_FILES([dlls/rpcrt4/tests/Makefile])
AC_CONFIG_FILES([dlls/rsabase/Makefile])
...
...
dlls/Makefile.in
View file @
74cd5903
...
...
@@ -292,6 +292,7 @@ TESTSUBDIRS = \
psapi/tests
\
quartz/tests
\
riched20/tests
\
riched32/tests
\
rpcrt4/tests
\
rsabase/tests
\
rsaenh/tests
\
...
...
dlls/riched32/tests/Makefile.in
0 → 100644
View file @
74cd5903
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
riched32.dll
IMPORTS
=
ole32 user32 gdi32 kernel32
CTESTS
=
\
editor.c
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/riched32/tests/editor.c
0 → 100644
View file @
74cd5903
/*
* Unit test suite for rich edit control 1.0
*
* Copyright 2006 Google (Thomas Kho)
* Copyright 2007 Matt Finnicum
* Copyright 2007 Dmitry Timoshkov
* Copyright 2007 Alex Villacís Lasso
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <assert.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include <winnls.h>
#include <ole2.h>
#include <richedit.h>
#include <time.h>
#include <wine/test.h>
static
HMODULE
hmoduleRichEdit
;
static
HWND
new_window
(
LPCTSTR
lpClassName
,
DWORD
dwStyle
,
HWND
parent
)
{
HWND
hwnd
;
hwnd
=
CreateWindow
(
lpClassName
,
NULL
,
dwStyle
|
WS_POPUP
|
WS_HSCROLL
|
WS_VSCROLL
|
WS_VISIBLE
,
0
,
0
,
200
,
60
,
parent
,
NULL
,
hmoduleRichEdit
,
NULL
);
ok
(
hwnd
!=
NULL
,
"class: %s, error: %d
\n
"
,
lpClassName
,
(
int
)
GetLastError
());
return
hwnd
;
}
static
HWND
new_richedit
(
HWND
parent
)
{
return
new_window
(
RICHEDIT_CLASS10A
,
ES_MULTILINE
,
parent
);
}
static
void
test_WM_SETTEXT
()
{
HWND
hwndRichEdit
=
new_richedit
(
NULL
);
const
char
*
TestItem1
=
"TestSomeText"
;
const
char
*
TestItem2
=
"TestSomeText
\r
"
;
const
char
*
TestItem3
=
"TestSomeText
\r
SomeMoreText
\r
"
;
const
char
*
TestItem4
=
"TestSomeText
\n\n
TestSomeText"
;
const
char
*
TestItem5
=
"TestSomeText
\r\r\n
TestSomeText"
;
const
char
*
TestItem6
=
"TestSomeText
\r\r\n\r
TestSomeText"
;
const
char
*
TestItem7
=
"TestSomeText
\r\n\r\r\n\r
TestSomeText"
;
const
char
*
TestItem8
=
"TestSomeText
\r\n
"
;
const
char
*
TestItem9
=
"TestSomeText
\r\n
SomeMoreText
\r\n
"
;
const
char
*
TestItem10
=
"TestSomeText
\r\n\r\n
TestSomeText"
;
const
char
*
TestItem11
=
"TestSomeText TestSomeText"
;
const
char
*
TestItem12
=
"TestSomeText
\r\n
TestSomeText"
;
const
char
*
TestItem13
=
"TestSomeText
\r\n
\r\n
TestSomeText"
;
char
buf
[
1024
]
=
{
0
};
LRESULT
result
;
/* This test attempts to show that WM_SETTEXT on a riched32 control does not
attempt to modify the text that is pasted into the control, and should
return it as is. In particular, \r\r\n is NOT converted, unlike riched20.
Currently, builtin riched32 mangles solitary \r or \n when not part of
a \r\n pair.
*/
#define TEST_SETTEXT(a, b, is_todo) \
result = SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) a); \
ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \
result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buf); \
ok (result == strlen(buf), \
"WM_GETTEXT returned %ld instead of expected %u\n", \
result, strlen(buf)); \
result = strcmp(b, buf); \
if (is_todo) todo_wine { \
ok(result == 0, \
"WM_SETTEXT round trip: strcmp = %ld\n", result); \
} else { \
ok(result == 0, \
"WM_SETTEXT round trip: strcmp = %ld\n", result); \
}
TEST_SETTEXT
(
TestItem1
,
TestItem1
,
0
)
TEST_SETTEXT
(
TestItem2
,
TestItem2
,
1
)
TEST_SETTEXT
(
TestItem3
,
TestItem3
,
1
)
TEST_SETTEXT
(
TestItem4
,
TestItem4
,
1
)
TEST_SETTEXT
(
TestItem5
,
TestItem5
,
1
)
TEST_SETTEXT
(
TestItem6
,
TestItem6
,
1
)
TEST_SETTEXT
(
TestItem7
,
TestItem7
,
1
)
TEST_SETTEXT
(
TestItem8
,
TestItem8
,
0
)
TEST_SETTEXT
(
TestItem9
,
TestItem9
,
0
)
TEST_SETTEXT
(
TestItem10
,
TestItem10
,
0
)
TEST_SETTEXT
(
TestItem11
,
TestItem11
,
0
)
TEST_SETTEXT
(
TestItem12
,
TestItem12
,
0
)
TEST_SETTEXT
(
TestItem13
,
TestItem13
,
0
)
#undef TEST_SETTEXT
DestroyWindow
(
hwndRichEdit
);
}
START_TEST
(
editor
)
{
MSG
msg
;
time_t
end
;
/* Must explicitly LoadLibrary(). The test has no references to functions in
* RICHED32.DLL, so the linker doesn't actually link to it. */
hmoduleRichEdit
=
LoadLibrary
(
"RICHED32.DLL"
);
ok
(
hmoduleRichEdit
!=
NULL
,
"error: %d
\n
"
,
(
int
)
GetLastError
());
test_WM_SETTEXT
();
/* Set the environment variable WINETEST_RICHED32 to keep windows
* responsive and open for 30 seconds. This is useful for debugging.
*
* The message pump uses PeekMessage() to empty the queue and then sleeps for
* 50ms before retrying the queue. */
end
=
time
(
NULL
)
+
30
;
if
(
getenv
(
"WINETEST_RICHED32"
))
{
while
(
time
(
NULL
)
<
end
)
{
if
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
{
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
else
{
Sleep
(
50
);
}
}
}
OleFlushClipboard
();
ok
(
FreeLibrary
(
hmoduleRichEdit
)
!=
0
,
"error: %d
\n
"
,
(
int
)
GetLastError
());
}
programs/winetest/Makefile.in
View file @
74cd5903
...
...
@@ -68,6 +68,7 @@ TESTBINS = \
psapi_test.exe
\
quartz_test.exe
\
riched20_test.exe
\
riched32_test.exe
\
rpcrt4_test.exe
\
rsabase_test.exe
\
rsaenh_test.exe
\
...
...
@@ -187,6 +188,8 @@ quartz_test.exe: $(DLLDIR)/quartz/tests/quartz_test.exe$(DLLEXT)
cp
$(DLLDIR)
/quartz/tests/quartz_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
riched20_test.exe
:
$(DLLDIR)/riched20/tests/riched20_test.exe$(DLLEXT)
cp
$(DLLDIR)
/riched20/tests/riched20_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
riched32_test.exe
:
$(DLLDIR)/riched32/tests/riched32_test.exe$(DLLEXT)
cp
$(DLLDIR)
/riched32/tests/riched32_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
rpcrt4_test.exe
:
$(DLLDIR)/rpcrt4/tests/rpcrt4_test.exe$(DLLEXT)
cp
$(DLLDIR)
/rpcrt4/tests/rpcrt4_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
rsabase_test.exe
:
$(DLLDIR)/rsabase/tests/rsabase_test.exe$(DLLEXT)
...
...
programs/winetest/winetest.rc
View file @
74cd5903
...
...
@@ -126,6 +126,7 @@ pdh_test.exe TESTRES "pdh_test.exe"
psapi_test.exe TESTRES "psapi_test.exe"
quartz_test.exe TESTRES "quartz_test.exe"
riched20_test.exe TESTRES "riched20_test.exe"
riched32_test.exe TESTRES "riched32_test.exe"
rpcrt4_test.exe TESTRES "rpcrt4_test.exe"
rsabase_test.exe TESTRES "rsabase_test.exe"
rsaenh_test.exe TESTRES "rsaenh_test.exe"
...
...
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