Module: wine Branch: master Commit: 26d565ac1bfc53b243d1bc5a26add74c73f3fe77 URL: http://source.winehq.org/git/wine.git/?a=commit;h=26d565ac1bfc53b243d1bc5a26...
Author: Paul Vriens Paul.Vriens.Wine@gmail.com Date: Thu Nov 27 10:50:07 2008 +0100
rsaenh/tests: Fix a test failure on NT4 and below.
---
dlls/rsaenh/tests/rsaenh.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index 8d094aa..20e9001 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -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);