crypt32/tests: Detect missing HEXRAW support by output.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6ee109c5aa
commit
eb00dbd913
|
@ -363,11 +363,16 @@ static void test_CryptBinaryToString(void)
|
|||
heap_free(encodedW);
|
||||
}
|
||||
|
||||
/* winxp and win2k3 are documented as not handling HEXRAW but do not return failure */
|
||||
GetVersionExA(&ver);
|
||||
if (ver.dwMajorVersion <= 5)
|
||||
/* Systems that don't support HEXRAW format convert to BASE64 instead - 3 bytes in -> 4 chars + crlf + 1 null out. */
|
||||
strLen = 0;
|
||||
ret = CryptBinaryToStringW(input, 3, CRYPT_STRING_HEXRAW, NULL, &strLen);
|
||||
todo_wine {
|
||||
ok(ret, "Failed to get string length.\n");
|
||||
ok(strLen == 9 || broken(strLen == 7), "Unexpected string length %d.\n", strLen);
|
||||
}
|
||||
if (strLen == 7)
|
||||
{
|
||||
win_skip("CryptBinaryToString(HEX) not supported\n");
|
||||
win_skip("CryptBinaryToString(HEXRAW) not supported\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -376,6 +381,12 @@ static void test_CryptBinaryToString(void)
|
|||
|
||||
for (i = 0; i < ARRAY_SIZE(flags); i++)
|
||||
{
|
||||
strLen = 0;
|
||||
ret = CryptBinaryToStringW(input, sizeof(input), CRYPT_STRING_HEXRAW|flags[i], NULL, &strLen);
|
||||
todo_wine {
|
||||
ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError());
|
||||
ok(strLen > 0, "Unexpected string length.\n");
|
||||
}
|
||||
strLen = ~0;
|
||||
ret = CryptBinaryToStringW(input, sizeof(input), CRYPT_STRING_HEXRAW|flags[i],
|
||||
NULL, &strLen);
|
||||
|
|
Loading…
Reference in New Issue