shlwapi/tests: Fix a test failure on Windows 10.

AssocQueryString() can return S_FALSE with the size of the required buffer.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2016-03-17 23:38:42 +01:00 committed by Alexandre Julliard
parent cecc496ecf
commit 637799db98
1 changed files with 4 additions and 2 deletions

View File

@ -102,9 +102,11 @@ static void test_getstring_bad(void)
hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotBad, open, NULL, &len);
ok(hr == E_FAIL ||
hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ ||
hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), /* Win8 */
hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND) /* Win8 */ ||
hr == S_FALSE, /* Win10 */
"Unexpected result : %08x\n", hr);
ok(len == 0xdeadbeef, "got %u\n", len);
ok((hr == S_FALSE && len < sizeof(buf)/sizeof(buf[0])) || len == 0xdeadbeef,
"got hr=%08x and len=%u\n", hr, len);
len = 0xdeadbeef;
hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, invalid, NULL, &len);