advapi32/tests: Skip tests when our language isn't LANG_ENGLISH.

This commit is contained in:
Paul Vriens 2008-02-16 14:11:57 +01:00 committed by Alexandre Julliard
parent c6e61fbf89
commit ba4669860e
1 changed files with 49 additions and 35 deletions

View File

@ -1543,6 +1543,12 @@ static void test_LookupAccountName(void)
domain_size = domain_save;
sid_size = sid_save;
if (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) != LANG_ENGLISH)
{
skip("Non-english locale (test with hardcoded 'Everyone')\n");
}
else
{
ret = LookupAccountNameA(NULL, "Everyone", psid, &sid_size, domain, &domain_size, &sid_use);
get_sid_info(psid, &account, &sid_dom);
ok(ret, "Failed to lookup account name\n");
@ -1555,6 +1561,7 @@ static void test_LookupAccountName(void)
ok(lstrlen(domain) == domain_size, "Expected %d, got %d\n", lstrlen(domain), domain_size);
ok(sid_use == SidTypeWellKnownGroup, "Expected SidTypeUser, got %d\n", sid_use);
domain_size = domain_save;
}
/* NULL Sid with zero sid size */
SetLastError(0xdeadbeef);
@ -2046,6 +2053,12 @@ static void test_SetEntriesInAcl(void)
ok(NewAcl != NULL, "returned acl was NULL\n");
LocalFree(NewAcl);
if (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) != LANG_ENGLISH)
{
skip("Non-english locale (test with hardcoded 'Everyone')\n");
}
else
{
ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_USER;
ExplicitAccess.Trustee.ptstrName = (LPWSTR)wszEveryone;
res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl);
@ -2072,6 +2085,7 @@ static void test_SetEntriesInAcl(void)
ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res);
ok(NewAcl != NULL, "returned acl was NULL\n");
LocalFree(NewAcl);
}
ExplicitAccess.grfAccessMode = REVOKE_ACCESS;
ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID;