Commit Graph

66 Commits

Author SHA1 Message Date
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
Alexandre Julliard bf75129810 riched32: Fix the extra window bytes count for 64-bit. 2009-06-02 11:57:22 +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
Dylan Smith 0832737427 richedit: End of line sequence limited to 2 carriage returns.
riched32.dll does preserve the carriage returns and line feeds unlike
later versions of the richedit control, however the tests previously
missed the fact that a sequence of carriage returns followed by a line
feed (e.g. \r\r\r\n) can actually cause multiple paragraph breaks.
2009-01-27 11:20:37 +01:00
Dylan Smith 29ddbce288 riched32: Modified tests to show paragraph break inconsistency.
Several carriage returns followed by a line break were being handled as
a single paragraph break, when actually native richedit controls may
count this as several line breaks.
2009-01-27 11:20:15 +01:00
Dylan Smith 89f88a49a4 richedit: Store an internal copy of the window style flags. 2009-01-16 12:35:28 +01:00
Dylan Smith 9a902f358b richedit: Added tests for initial options.
Using the WS_VSCROLL style causes the ES_AUTOVSCROLL option to be set,
and using the WS_HSCROLL style causes the ES_AUTOHSCROLL flag to be
set (except with richedit v1.0).
2009-01-16 12:35:17 +01:00
Dylan Smith 55d9e95892 richedit: Added tests for autoscrolling options based on WS_V/HSCROLL. 2009-01-12 14:38:36 +01:00
Paul Vriens 3e6d1bfd93 riched32/tests: Remove the todo_wine logic where appropriate. 2008-12-10 10:49:57 +01:00
Paul Vriens fba5c4f328 riched32/tests: Remove an incorrect comment. 2008-12-09 12:53:01 +01:00
Dylan Smith 4c28a5bcfb richedit: Fixed initial word wrap setting when emulating 1.0. 2008-10-27 12:01:37 +01:00
Dylan Smith 9b4c821185 richedit: Added riched32 tests for word wrap. 2008-10-27 12:01:25 +01:00
Dylan Smith 46d79b0363 richedit: Fixed EM_POSFROMCHAR for pos of text length.
For some reason EM_POSFROMCHAR was returning 0 when the position was
equal to the end of the text, or beyond the end of the text. Instead
it should use the position at the end of the text for both these
cases.  The x value was also seen to be offset by 1 according to the
tests.
2008-10-22 13:54:54 +02:00
Michael Stefaniuc 8ca3e38770 riched32: Remove superfluous backslashes at end of lines. 2008-10-16 11:28:49 +02:00
Dylan Smith add180dde0 riched32: Added class style to process double click events. 2008-06-27 11:09:28 +02:00
Alex Villacís Lasso acec891ac2 richedit: EM_POSFROMCHAR should take into account scrollbar position. With tests. 2008-06-24 11:44:37 +02:00
Alex Villacís Lasso 3cc6e2365a richedit: When returning position through wParam pointer, EM_POSFROMCHAR must return 0 as LRESULT.
Add tests for EM_POSFROMCHAR for 1.0 and 2.0.
2008-06-24 11:43:42 +02:00
Alexandre Julliard 13ab99b404 richedit: Avoid strlen in traces. 2008-05-02 13:59:06 +02:00
Alex Villacís Lasso 2a4fc97c4c richedit: Add tests for EM_FINDTEXT in 1.0 emulation, make them pass under Wine. 2008-05-01 10:57:34 +02:00
Alex Villacís Lasso 2ab63774f1 richedit: On failure to parse incoming text as RTF, EM_STREAMIN must set dwError to -16. 2008-04-30 10:22:42 +02:00
Alex Villacís Lasso cac55008c9 richedit: Implement rule that in 1.0 emulation, a single CR that terminates the text is NOT a line break.
Fix riched32 test that now succeed.
2008-04-29 14:55:26 +02:00
Alex Villacís Lasso 4047df0f56 richedit: Flip the big switch and encode actual CR and LF into end-of-paragraph runs.
Document remaining uses of bEmulateVersion10 and other checks for CRLF in editor.c.
Make RTF reader emit a \r or a \r\n according to emulation, not a \n, which breaks streaming tests.
Remove todo_wine from a bunch of riched32 tests that now succeed.
2008-04-29 14:55:15 +02:00
Alex Villacís Lasso 3a271386ec richedit: Remove indication for bCRLF, now that ME_GetTextW() knows how to honor CR and LF counters.
EM_GETTEXTRANGE and EM_GETSELTEXT are affected by this, so include tests to ensure no behavior was broken.
2008-04-29 14:54:59 +02:00
Alex Villacís Lasso d95cbeef67 richedit: EM_LINELENGTH: honor CR and LF counters.
Add fixup to ME_FindItemAtOffset(), fixes crash by null-pointer access.
Add tests for EM_LINELENGTH.
2008-04-29 14:54:29 +02:00
Alex Villacís Lasso 3968a67eb9 richedit: EM_GETLINE: honor CR and LF counters.
Add richedit 1.0 tests for EM_GETLINE.
2008-04-29 14:54:21 +02:00