Commit d2cce328 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

shlwapi: Fix tests under w2k8.

parent 44043a7d
......@@ -64,22 +64,26 @@ static void test_GetAcceptLanguagesA(void)
SetLastError(ERROR_SUCCESS);
retval = pGetAcceptLanguagesA( NULL, NULL);
ok(retval == E_FAIL,
ok(retval == E_FAIL ||
retval == E_INVALIDARG, /* w2k8 */
"function result wrong: got %08x; expected E_FAIL\n", retval);
ok(ERROR_SUCCESS == GetLastError(), "last error set to %u\n", GetLastError());
buffersize = sizeof(buffer);
SetLastError(ERROR_SUCCESS);
retval = pGetAcceptLanguagesA( NULL, &buffersize);
ok(retval == E_FAIL,
ok(retval == E_FAIL ||
retval == E_INVALIDARG, /* w2k8 */
"function result wrong: got %08x; expected E_FAIL\n", retval);
ok(buffersize == sizeof(buffer),
"buffersize was changed (2nd parameter; not on Win2k)\n");
ok(buffersize == sizeof(buffer) ||
buffersize == 0, /* w2k8*/
"buffersize was changed and is not 0; size (%d))\n", buffersize);
ok(ERROR_SUCCESS == GetLastError(), "last error set to %u\n", GetLastError());
SetLastError(ERROR_SUCCESS);
retval = pGetAcceptLanguagesA( buffer, NULL);
ok(retval == E_FAIL,
ok(retval == E_FAIL ||
retval == E_INVALIDARG, /* w2k8 */
"function result wrong: got %08x; expected E_FAIL\n", retval);
ok(ERROR_SUCCESS == GetLastError(), "last error set to %u\n", GetLastError());
......@@ -87,7 +91,8 @@ static void test_GetAcceptLanguagesA(void)
memset(buffer, 0, sizeof(buffer));
SetLastError(ERROR_SUCCESS);
retval = pGetAcceptLanguagesA( buffer, &buffersize);
ok(retval == E_FAIL,
ok(retval == E_FAIL ||
retval == E_INVALIDARG, /* w2k8 */
"function result wrong: got %08x; expected E_FAIL\n", retval);
ok(buffersize == 0,
"buffersize wrong(changed) got %08x; expected 0 (2nd parameter; not on Win2k)\n", buffersize);
......@@ -363,6 +368,12 @@ static void test_GetShellSecurityDescriptor(void)
pGetShellSecurityDescriptor=(void*)GetProcAddress(hShlwapi,(char*)475);
if(!pGetShellSecurityDescriptor)
{
skip("GetShellSecurityDescriptor not available\n");
return;
}
psd = pGetShellSecurityDescriptor(NULL, 2);
ok(psd==NULL, "GetShellSecurityDescriptor should fail\n");
psd = pGetShellSecurityDescriptor(rgsup, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment