Jon Griffiths : msvcrt/tests: Fix 3 tests that always fail on Vista.

Alexandre Julliard julliard at winehq.org
Wed May 28 04:56:53 CDT 2008


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

Author: Jon Griffiths <jon_p_griffiths at yahoo.com>
Date:   Mon May 26 08:13:49 2008 -0700

msvcrt/tests: Fix 3 tests that always fail on Vista.

---

 dlls/msvcrt/tests/string.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c
index 3da32d8..5247515 100644
--- a/dlls/msvcrt/tests/string.c
+++ b/dlls/msvcrt/tests/string.c
@@ -589,8 +589,11 @@ static void test_wcscpy_s(void)
     /* Test invalid size */
     szDest[0] = 'A';
     ret = p_wcscpy_s(szDest, 0, szLongText);
-    ok(ret == ERANGE, "expected ERANGE got %d\n", ret);
-    ok(szDest[0] == 0, "szDest[0] not 0\n");
+    /* Later versions changed the return value for this case to EINVAL,
+     * and don't modify the result if the dest size is 0.
+     */
+    ok(ret == ERANGE || ret == EINVAL, "expected ERANGE/EINVAL got %d\n", ret);
+    ok(szDest[0] == 0 || ret == EINVAL, "szDest[0] not 0\n");
 
     /* Copy same buffer size */
     ret = p_wcscpy_s(szDest, 18, szLongText);
@@ -600,7 +603,7 @@ static void test_wcscpy_s(void)
     /* Copy smaller buffer size */
     szDest[0] = 'A';
     ret = p_wcscpy_s(szDestShort, 8, szLongText);
-    ok(ret == EINVAL, "expected EINVAL got %d\n", ret);
+    ok(ret == ERANGE || ret == EINVAL, "expected ERANGE/EINVAL got %d\n", ret);
     ok(szDestShort[0] == 0, "szDestShort[0] not 0\n");
 }
 




More information about the wine-cvs mailing list