Huw Davies : ole32/tests: For win9x and winme the size of the data on the clipboard may be larger than expected .

Alexandre Julliard julliard at winehq.org
Thu Apr 23 11:27:23 CDT 2009


Module: wine
Branch: master
Commit: 11cb788f354e0787920120c5c463aa7881a5466c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=11cb788f354e0787920120c5c463aa7881a5466c

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Apr 23 10:52:16 2009 +0100

ole32/tests: For win9x and winme the size of the data on the clipboard may be larger than expected.

---

 dlls/ole32/tests/clipboard.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
index a64fa23..a4f9307 100644
--- a/dlls/ole32/tests/clipboard.c
+++ b/dlls/ole32/tests/clipboard.c
@@ -767,8 +767,10 @@ static void test_cf_dataobject(IDataObject *data)
             ok(DataObjectImpl_GetDataHere_calls == 1, "got %d\n", DataObjectImpl_GetDataHere_calls);
             ptr = GlobalLock(h);
             size = GlobalSize(h);
-            ok(size == strlen(cmpl_stm_data), "expected %d got %d\n", lstrlenA(cmpl_stm_data), size);
-            ok(!memcmp(ptr, cmpl_stm_data, size), "mismatch\n");
+            ok(size == strlen(cmpl_stm_data) ||
+               broken(size > strlen(cmpl_stm_data)), /* win9x, winme */
+               "expected %d got %d\n", lstrlenA(cmpl_stm_data), size);
+            ok(!memcmp(ptr, cmpl_stm_data, strlen(cmpl_stm_data)), "mismatch\n");
             GlobalUnlock(h);
         }
         else if(cf == cf_global)
@@ -782,8 +784,10 @@ static void test_cf_dataobject(IDataObject *data)
             ok(DataObjectImpl_GetDataHere_calls == 0, "got %d\n", DataObjectImpl_GetDataHere_calls);
             ptr = GlobalLock(h);
             size = GlobalSize(h);
-            ok(size == strlen(cmpl_text_data) + 1, "expected %d got %d\n", lstrlenA(cmpl_text_data) + 1, size);
-            ok(!memcmp(ptr, cmpl_text_data, size), "mismatch\n");
+            ok(size == strlen(cmpl_text_data) + 1 ||
+               broken(size > strlen(cmpl_text_data) + 1), /* win9x, winme */
+               "expected %d got %d\n", lstrlenA(cmpl_text_data) + 1, size);
+            ok(!memcmp(ptr, cmpl_text_data, strlen(cmpl_text_data) + 1), "mismatch\n");
             GlobalUnlock(h);
         }
     } while(cf);




More information about the wine-cvs mailing list