James Hawkins : riched20: Fix a few tests that fail in XP and up.
Alexandre Julliard
julliard at winehq.org
Thu Apr 24 06:23:30 CDT 2008
Module: wine
Branch: master
Commit: ead42d7f7f605996d2f212102e65e53ce4dcece2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ead42d7f7f605996d2f212102e65e53ce4dcece2
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Wed Apr 23 18:20:21 2008 -0500
riched20: Fix a few tests that fail in XP and up.
---
dlls/riched20/tests/editor.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 236a777..b6e9176 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -680,9 +680,12 @@ static void test_WM_GETTEXT(void)
/* Test for behavior in overflow case */
memset(buffer, 0, 1024);
result = SendMessage(hwndRichEdit, WM_GETTEXT, strlen(text), (LPARAM)buffer);
- ok(result == 0,
- "WM_GETTEXT returned %d, expected 0\n", result);
+ ok(result == 0 ||
+ result == lstrlenA(text) - 1, /* XP, win2k3 */
+ "WM_GETTEXT returned %d, expected 0 or %d\n", result, lstrlenA(text) - 1);
result = strcmp(buffer,text);
+ if (result)
+ result = strncmp(buffer, text, lstrlenA(text) - 1); /* XP, win2k3 */
ok(result == 0,
"WM_GETTEXT: settext and gettext differ. strcmp: %d\n", result);
@@ -704,9 +707,12 @@ static void test_WM_GETTEXT(void)
/* Test for behavior of CRLF conversion in case of overflow */
memset(buffer, 0, 1024);
result = SendMessage(hwndRichEdit, WM_GETTEXT, strlen(text2), (LPARAM)buffer);
- ok(result == 0,
- "WM_GETTEXT returned %d, expected 0\n", result);
+ ok(result == 0 ||
+ result == lstrlenA(text2) - 1, /* XP, win2k3 */
+ "WM_GETTEXT returned %d, expected 0 or %d\n", result, lstrlenA(text2) - 1);
result = strcmp(buffer,text2);
+ if (result)
+ result = strncmp(buffer, text2, lstrlenA(text2) - 1); /* XP, win2k3 */
ok(result == 0,
"WM_GETTEXT: settext and gettext differ. strcmp: %d\n", result);
More information about the wine-cvs
mailing list