Module: wine Branch: master Commit: 8c820434a49a66291ca5a8e5c75310d64bf9918d URL: http://source.winehq.org/git/wine.git/?a=commit;h=8c820434a49a66291ca5a8e5c7...
Author: Paul Vriens Paul.Vriens.Wine@gmail.com Date: Wed Jun 3 13:31:14 2009 +0200
riched32/tests: Fix a few test failures on NT4 and below.
---
dlls/riched32/tests/editor.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/riched32/tests/editor.c b/dlls/riched32/tests/editor.c index e21c058..079045c 100644 --- a/dlls/riched32/tests/editor.c +++ b/dlls/riched32/tests/editor.c @@ -53,14 +53,15 @@ static void test_WM_SETTEXT(void) static const struct { const char *itemtext; DWORD lines; + DWORD lines_broken; } testitems[] = { { "TestSomeText", 1}, { "TestSomeText\r", 1}, - { "TestSomeText\rSomeMoreText\r", 2}, + { "TestSomeText\rSomeMoreText\r", 2, 1}, /* NT4 and below */ { "TestSomeText\n\nTestSomeText", 3}, { "TestSomeText\r\r\nTestSomeText", 2}, - { "TestSomeText\r\r\n\rTestSomeText", 3}, - { "TestSomeText\r\n\r\r\n\rTestSomeText", 4}, + { "TestSomeText\r\r\n\rTestSomeText", 3, 2}, /* NT4 and below */ + { "TestSomeText\r\n\r\r\n\rTestSomeText", 4, 3}, /* NT4 and below */ { "TestSomeText\r\n" ,2}, { "TestSomeText\r\nSomeMoreText\r\n", 3}, { "TestSomeText\r\n\r\nTestSomeText", 3}, @@ -68,8 +69,8 @@ static void test_WM_SETTEXT(void) { "TestSomeText \r\nTestSomeText", 2}, { "TestSomeText\r\n \r\nTestSomeText", 3}, { "TestSomeText\n", 2}, - { "TestSomeText\r\r\r", 3}, - { "TestSomeText\r\r\rSomeMoreText", 4} + { "TestSomeText\r\r\r", 3, 1}, /* NT4 and below */ + { "TestSomeText\r\r\rSomeMoreText", 4, 2} /* NT4 and below */ }; HWND hwndRichEdit = new_richedit(NULL); int i; @@ -104,7 +105,8 @@ static void test_WM_SETTEXT(void) ok (result == 0, "[%d] WM_SETTEXT round trip: strcmp = %ld\n", i, result); result = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok (result == testitems[i].lines, + ok (result == testitems[i].lines || + broken(testitems[i].lines_broken && result == testitems[i].lines_broken), "[%d] EM_GETLINECOUNT returned %ld, expected %d\n", i, result, testitems[i].lines); }