Commit cea45c53 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

shlwapi/tests: Don't test unimplemented functions.

parent 4732f48f
......@@ -42,13 +42,19 @@ static void test_GetAcceptLanguagesA(void)
DWORD buffersize, buffersize2, exactsize;
char buffer[100];
if (!pGetAcceptLanguagesA)
if (!pGetAcceptLanguagesA) {
win_skip("GetAcceptLanguagesA is not available\n");
return;
}
buffersize = sizeof(buffer);
memset(buffer, 0, sizeof(buffer));
SetLastError(ERROR_SUCCESS);
retval = pGetAcceptLanguagesA( buffer, &buffersize);
if (!retval && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) {
win_skip("GetAcceptLanguagesA is not implemented\n");
return;
}
trace("GetAcceptLanguagesA: retval %08x, size %08x, buffer (%s),"
" last error %u\n", retval, buffersize, buffer, GetLastError());
if(retval != S_OK) {
......@@ -58,7 +64,6 @@ static void test_GetAcceptLanguagesA(void)
ok( (ERROR_NO_IMPERSONATION_TOKEN == GetLastError()) ||
(ERROR_CLASS_DOES_NOT_EXIST == GetLastError()) ||
(ERROR_PROC_NOT_FOUND == GetLastError()) ||
(ERROR_CALL_NOT_IMPLEMENTED == GetLastError()) ||
(ERROR_SUCCESS == GetLastError()), "last error set to %u\n", GetLastError());
exactsize = strlen(buffer);
......@@ -105,9 +110,9 @@ static void test_GetAcceptLanguagesA(void)
switch(retval) {
case 0L:
if(buffersize == exactsize) {
ok( (ERROR_SUCCESS == GetLastError()) || (ERROR_CALL_NOT_IMPLEMENTED == GetLastError()) ||
ok( (ERROR_SUCCESS == GetLastError()) ||
(ERROR_PROC_NOT_FOUND == GetLastError()) || (ERROR_NO_IMPERSONATION_TOKEN == GetLastError()),
"last error wrong: got %u; expected ERROR_SUCCESS(NT4)/ERROR_CALL_NOT_IMPLEMENTED(98/ME)/"
"last error wrong: got %u; expected ERROR_SUCCESS(NT4)/"
"ERROR_PROC_NOT_FOUND(NT4)/ERROR_NO_IMPERSONATION_TOKEN(XP)\n", GetLastError());
ok(exactsize == strlen(buffer),
"buffer content (length) wrong: got %08x, expected %08x\n", lstrlenA(buffer), exactsize);
......@@ -370,7 +375,7 @@ static void test_GetShellSecurityDescriptor(void)
if(!pGetShellSecurityDescriptor)
{
skip("GetShellSecurityDescriptor not available\n");
win_skip("GetShellSecurityDescriptor not available\n");
return;
}
......@@ -379,7 +384,14 @@ static void test_GetShellSecurityDescriptor(void)
psd = pGetShellSecurityDescriptor(rgsup, 0);
ok(psd==NULL, "GetShellSecurityDescriptor should fail\n");
SetLastError(0xdeadbeef);
psd = pGetShellSecurityDescriptor(rgsup, 2);
if (psd == NULL && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
/* The previous calls to GetShellSecurityDescriptor don't set the last error */
win_skip("GetShellSecurityDescriptor is not implemented\n");
return;
}
ok(psd!=NULL, "GetShellSecurityDescriptor failed\n");
if (psd!=NULL)
{
......
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