Commit Graph

82 Commits

Author SHA1 Message Date
Huw Davies dc6434959e riched20: Handle EM_GETSELTEXT's unicode conversion in the host.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-15 20:35:41 +01:00
Huw Davies 93fec636d5 richedit: Handle EM_GETTEXTRANGE's unicode conversion in the host.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 12:14:20 +01:00
Huw Davies 8dbc40be14 riched32/tests: Add a todo_wine for a test that has always failed.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Huw Davies 638dbc4b20 riched32/tests: Use the system locale to determine rtl and multibyte behaviour.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Francois Gouget a29af844e6 riched32/tests: Avoid an unneeded strlen() call.
Note that buffer is an array and thus cannot be NULL.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 20:59:19 +01:00
Michael Stefaniuc 4b3b27a7f1 riched32/tests: Test the correct return value.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-03 16:31:33 +02:00
Michael Stefaniuc 350123e183 riched20/tests: Avoid using the comma operator.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 09:37:31 +01:00
Fabian Maurer 52c106418c riched32: Handle enter press in WM_CHAR instead of WM_KEYDOWN.
This fixes an old regression when VK_RETURN handling was implemented

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=23282
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 17:10:13 +01:00
Fabian Maurer c03c5397a2 riched20/tests: Refactor tests testing VK_RETURN.
This is basically a no-op to make the tests and the following
additions simpler

Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 17:10:11 +01:00
Michael Stefaniuc ebfe62fc7f riched32/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-19 20:49:54 +02:00
Jactry Zeng 3beb006063 riched32/tests: Simplify tests with todo_wine_if.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 23:26:30 +09:00
Jactry Zeng 439e9c6a31 riched32/tests: Test WM_GETTEXTLENGTH with multibyte character.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-23 16:32:14 +01:00
Jactry Zeng 2226358773 riched32/tests: Test EM_GETSELTEXT with multibyte character.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-23 16:32:13 +01:00
Jactry Zeng 4871b0236b riched32/tests: Test EM_GETTEXTRANGE with multibyte character.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-23 16:32:13 +01:00
Jactry Zeng 43bd40bdec riched32/tests: Add tests for selection.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-21 19:50:29 +01:00
Jactry Zeng d9ead0c899 riched32/tests: Test EM_LINELENGTH with multibyte character.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-21 19:50:28 +01:00
Alexandre Julliard 99ef0d6ff0 makefiles: Get rid of the MAKE_TEST_RULES variable. 2014-01-02 12:13:16 +01:00
André Hentschel ddd6fd1ecb riched32/tests: Fix tests compilation with __WINESRC__ defined. 2013-10-28 20:08:14 +01:00
Michael Stefaniuc 0e681027a2 tests: Compile the tests by default with -D__WINESRC__. 2013-10-02 11:04:02 +02:00
Michael Stefaniuc 9463dba830 tests: Use the explicit LoadLibraryA function. 2013-10-02 11:02:21 +02:00
Jason Edmeades efbde389c7 richedit: v1.0 richedit uses CR and LF for enter. 2012-01-23 16:07:41 +01:00
Francois Gouget 3de330db54 tests: Remove unneeded assert.h includes. 2011-09-27 10:59:56 +02:00
Greg Geldorp 55ffeeeec0 riched32/tests: Fix editor tests. 2011-01-25 12:45:32 +01:00
André Hentschel 04374ab6d5 riched32/tests: Don't test function directly when reporting GetLastError(). 2010-12-31 11:43:43 +01:00
Austin Lund 12c964be68 riched32/tests: Correct error messages in EM_POSFROMCHAR tests. 2010-10-12 12:17:52 +02:00
Alexandre Julliard 95c1bd4da9 riched20/tests: Make some variables static. 2010-10-01 13:40:29 +02:00
Austin English 920f451c9e riched32: Fix a compiler warning on clang. 2010-09-20 13:55:53 +02:00
Alexandre Julliard 81b8ee863e makefiles: Add a standard header for all makefiles to replace the common variable initializations. 2010-09-19 12:36:48 +02:00
Alexandre Julliard b86d515ed6 dlls: Remove explicit imports of kernel32 and ntdll. 2010-07-21 17:38:36 +02:00
Alexandre Julliard bef5645eb1 makefiles: Remove the no longer needed explicit separators for dependencies. 2010-03-16 13:28:19 +01:00
Alexandre Julliard 6164ce2d82 makefiles: Use the standard C_SRCS variable as the list of test files.
This enables it to be auto-updated by make_makefiles.
2010-02-22 10:47:11 +01:00
Paul Vriens c5946beccc riched32/tests: Fix test failures on Win9x, WinMe and NT4. 2009-06-15 13:42:27 +02:00
Paul Vriens 45629dc050 riched32/tests: Cater for differences between platforms. 2009-06-12 17:33:16 +02:00
Paul Vriens 5084632864 riched32/tests: Fix a few test failures on Win9x/WinME/NT4. 2009-06-12 17:33:16 +02:00
Paul Vriens 3a228fb593 riched32/tests: Correct a test to better show the behavior. 2009-06-10 16:54:35 +02:00
Paul Vriens 984300b59e riched32/tests: Fix a few test failures on Win9x, WinME and NT4. 2009-06-10 11:53:03 +02:00
Paul Vriens 8e0849f7a6 riched32/tests: Fix some test failures on Win9x/WinME/NT4. 2009-06-09 17:01:15 +02:00
Paul Vriens d449fcde40 riched32/tests: Fix a test failure on NT4 and below. 2009-06-05 14:43:24 +02:00
Paul Vriens 8c820434a4 riched32/tests: Fix a few test failures on NT4 and below. 2009-06-03 15:34:32 +02:00
Paul Vriens d2844b15be riched32/tests: Change the test to facilitate adding a broken(). 2009-06-03 15:34:32 +02:00
Paul Vriens e1b80a04a0 riched32/tests: Skip some tests on Win9x, WinME and NT4. 2009-02-03 15:32:49 +01:00
Dylan Smith 95d82484e1 richedit: Fixed EM_FINDTEXT to pass todo tests.
There was a bug in ME_FindText which would cause the final caracter
offset to be incorrect when a paragraph was crossed while matching
characters.  The problem was the character offset of the wrong
paragraph was used in the calculation of the start offset of the
match.
2009-02-02 15:21:45 +01:00
Dylan Smith 1a3551b630 richedit: Use width from EM_SETTARGETDEVICE for wrapping.
The width for EM_SETTARGETDEVICE is used by some applications to set the
wrapping width to a certain distance in twips.  This can be used even
though the target device is ignored.
2009-02-02 15:21:44 +01:00
Alasdair Sinclair 44df3f5430 riched32/tests: Fix missing void in empty parameter list. 2009-01-30 11:43:33 +01:00
Dylan Smith 5d74f58382 richedit: Actually store end of line string for end paragraph runs.
Previously a count of the carraige returns and line feeds were stored
for end of paragraph runs, and a paragraph sign was stored as the actual
string.  This was causing many special cases where the length of the
run needed to be determined differently if the run was or wasn't an
end of paragraph run.

There wasn't any use for storing the paragraph sign unless some drawing
code gets commented out to allow the end paragraphs to be shown,
therefore I changed the code to store the actual string that gets
retrieved by WM_GETTEXT.
2009-01-28 12:11:36 +01:00
Dylan Smith 8ec60e9775 riched32: Test EM_FINDTEXT searching for end of line characters.
EM_FINDTEXT should be able to find end of line characters, but currently
it doesn't.
2009-01-27 11:21:38 +01:00
Dylan Smith 61f189cec8 richedit: Handle starting in EOL sequence in EM_GETTEXTRANGE.
EM_GETTEXTRANGE allows the start character offset and end characters
offset to be used to specify the range of text to retrieve.  If the
start offset is in the middle of an end of paragraph run (i.e. \r\n),
then it should only retrieve the characters after the specified
character offset.
2009-01-27 11:21:16 +01:00
Dylan Smith 5bf9e73dd0 riched32: Test for EM_GETTEXTRANGE from middle of end of paragraph run.
EM_GETTEXTRANGE should be able to get part of the end of paragraph run,
for instance just the line feed in a carraige return line feed pair.
2009-01-27 11:21:07 +01:00
Dylan Smith c94e78a572 richedit: Handle case for EM_LINELENGTH when offset is between \r\n.
I found that ME_FindItemAtOffset and ME_CursorFromCharOfs are used
almost identically, except for how they handle a character offset that
is between a carriage return and line feed.  In this case
ME_CursorFromCharOfs sets the cursor's run offset to 0, but
ME_FindItemAtOffset instead returns the next run which is what was
causing ME_LINELENGTH to incorrectly return the length of the next
line.
2009-01-27 11:20:59 +01:00
Dylan Smith 83ff6a5c5d riched32: Test EM_LINELENGTH between carriage return & line feed.
Previously this wasn't properly tested for, since all the lines had
text of the same length, so it wasn't properly testing to see which
line length it was getting.
2009-01-27 11:20:49 +01:00