userenv/tests: Skip a few tests on NT4.

This commit is contained in:
Paul Vriens 2008-10-21 22:06:33 +02:00 committed by Alexandre Julliard
parent 8b01f4ae53
commit 86a0b2915a
1 changed files with 26 additions and 4 deletions

View File

@ -162,8 +162,6 @@ static void test_create_env(void)
int i, j;
static const struct profile_item common_vars[] = {
{ "ALLUSERSPROFILE", { 1, 1, 0, 0 } },
{ "CommonProgramFiles", { 1, 1, 1, 1 } },
{ "ComSpec", { 1, 1, 0, 0 } },
{ "COMPUTERNAME", { 1, 1, 1, 1 } },
{ "NUMBER_OF_PROCESSORS", { 1, 1, 0, 0 } },
@ -174,7 +172,11 @@ static void test_create_env(void)
{ "PROCESSOR_REVISION", { 1, 1, 0, 0 } },
{ "SystemDrive", { 1, 1, 0, 0 } },
{ "SystemRoot", { 1, 1, 0, 0 } },
{ "windir", { 1, 1, 0, 0 } },
{ "windir", { 1, 1, 0, 0 } }
};
static const struct profile_item common_post_nt4_vars[] = {
{ "ALLUSERSPROFILE", { 1, 1, 0, 0 } },
{ "CommonProgramFiles", { 1, 1, 1, 1 } },
{ "ProgramFiles", { 1, 1, 0, 0 } }
};
static const struct profile_item htok_vars[] = {
@ -216,7 +218,7 @@ static void test_create_env(void)
r = CreateEnvironmentBlock((LPVOID) &env[3], htok, TRUE);
expect(TRUE, r);
/* Test for common environment variables */
/* Test for common environment variables (NT4 and higher) */
for (i = 0; i < sizeof(common_vars)/sizeof(common_vars[0]); i++)
{
for (j = 0; j < 4; j++)
@ -229,6 +231,26 @@ static void test_create_env(void)
}
}
/* Test for common environment variables (post NT4) */
if (!GetEnvironmentVariableA("ALLUSERSPROFILE", NULL, 0))
{
win_skip("Some environment variables are not present on NT4\n");
}
else
{
for (i = 0; i < sizeof(common_post_nt4_vars)/sizeof(common_post_nt4_vars[0]); i++)
{
for (j = 0; j < 4; j++)
{
r = get_env(env[j], common_post_nt4_vars[i].name, &st);
if (common_post_nt4_vars[i].todo[j])
todo_wine expect_env(TRUE, r, common_post_nt4_vars[i].name);
else
expect_env(TRUE, r, common_post_nt4_vars[i].name);
}
}
}
/* Test for environment variables with values that depends on htok */
for (i = 0; i < sizeof(htok_vars)/sizeof(htok_vars[0]); i++)
{