From 2208d18bef5497e7b431a2b7f1cfe3be7abb0def Mon Sep 17 00:00:00 2001 From: Reece Dunn Date: Sun, 20 Jul 2008 15:23:07 +0100 Subject: [PATCH] crypt32: fixed the base64 tests on Vista. --- dlls/crypt32/tests/base64.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/crypt32/tests/base64.c b/dlls/crypt32/tests/base64.c index 4dd7c5f..89dc485 100644 --- a/dlls/crypt32/tests/base64.c +++ b/dlls/crypt32/tests/base64.c @@ -273,14 +273,15 @@ static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header, strcat(str, toDecode); if (trailer) strcat(str, trailer); + SetLastError(0xdeadbeef); ret = pCryptStringToBinaryA(str, 0, useFormat, NULL, &bufLen, NULL, NULL); /* expect failure with no header, and success with one */ if (header) ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); else - ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %d\n", GetLastError()); + ok((!ret && GetLastError() == ERROR_INVALID_DATA) || ret /* Vista */, + "Expected ERROR_INVALID_DATA, got ret=%d, error=%d\n", ret, GetLastError()); if (ret) { buf = HeapAlloc(GetProcessHeap(), 0, bufLen); @@ -290,8 +291,8 @@ static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header, ret = pCryptStringToBinaryA(str, 0, useFormat, buf, &bufLen, &skipped, &usedFormat); - ok(skipped == strlen(garbage), - "Expected %d characters skipped, got %d\n", lstrlenA(garbage), + ok(skipped == strlen(garbage) || skipped == 0 /* Vista */, + "Expected %d or 0 characters skipped, got %d\n", lstrlenA(garbage), skipped); HeapFree(GetProcessHeap(), 0, buf); } -- 1.5.6.1.1071.g76fb