rsaenh/tests: Fix a test failure on NT4 and below.

oldstable
Paul Vriens 2008-11-27 10:50:07 +01:00 committed by Alexandre Julliard
parent c3072bcaf3
commit 26d565ac1b
1 changed files with 6 additions and 1 deletions

View File

@ -1775,8 +1775,13 @@ static void test_enum_container(void)
/* If PP_ENUMCONTAINERS is queried with CRYPT_FIRST and abData == NULL, it returns
* the maximum legal length of container names (which is MAX_PATH + 1 == 261) */
SetLastError(0xdeadbeef);
result = CryptGetProvParam(hProv, PP_ENUMCONTAINERS, NULL, &dwBufferLen, CRYPT_FIRST);
ok (result && dwBufferLen == MAX_PATH + 1, "%08x\n", GetLastError());
ok (result, "%08x\n", GetLastError());
ok (dwBufferLen == MAX_PATH + 1 ||
broken(dwBufferLen == 10) || /* Win9x, WinMe */
broken(dwBufferLen == 55), /* NT4 */
"Expected dwBufferLen to be (MAX_PATH + 1), it was : %d\n", dwBufferLen);
/* If the result fits into abContainerName dwBufferLen is left untouched */
dwBufferLen = (DWORD)sizeof(abContainerName);