advapi32/tests: Prevent test failure when computer name and user name are the same.
This commit is contained in:
parent
808343fb5b
commit
e07e2ac3f7
|
@ -2047,7 +2047,8 @@ static void test_LookupAccountName(void)
|
||||||
domain = HeapAlloc(GetProcessHeap(), 0, domain_size);
|
domain = HeapAlloc(GetProcessHeap(), 0, domain_size);
|
||||||
ret = LookupAccountNameA(NULL, computer_name, psid, &sid_size, domain, &domain_size, &sid_use);
|
ret = LookupAccountNameA(NULL, computer_name, psid, &sid_size, domain, &domain_size, &sid_use);
|
||||||
ok(ret, "LookupAccountNameA failed: %d\n", GetLastError());
|
ok(ret, "LookupAccountNameA failed: %d\n", GetLastError());
|
||||||
ok(sid_use == SidTypeDomain, "expected SidTypeDomain, got %d\n", sid_use);
|
ok(sid_use == SidTypeDomain ||
|
||||||
|
(sid_use == SidTypeUser && ! strcmp(computer_name, user_name)), "expected SidTypeDomain for %s, got %d\n", computer_name, sid_use);
|
||||||
HeapFree(GetProcessHeap(), 0, domain);
|
HeapFree(GetProcessHeap(), 0, domain);
|
||||||
HeapFree(GetProcessHeap(), 0, psid);
|
HeapFree(GetProcessHeap(), 0, psid);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue