userenv/tests: Don't crash on NT4.

This commit is contained in:
Paul Vriens 2008-09-21 20:59:46 +02:00 committed by Alexandre Julliard
parent 8ccfe80c0b
commit a397448549

View file

@ -189,14 +189,22 @@ static void test_create_env(void)
r = SetEnvironmentVariableA("WINE_XYZZY", "ZZYZX");
expect(TRUE, r);
r = CreateEnvironmentBlock(NULL, NULL, FALSE);
expect(FALSE, r);
if (0)
{
/* Crashes on NT4 */
r = CreateEnvironmentBlock(NULL, NULL, FALSE);
expect(FALSE, r);
}
r = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, &htok);
expect(TRUE, r);
r = CreateEnvironmentBlock(NULL, htok, FALSE);
expect(FALSE, r);
if (0)
{
/* Crashes on NT4 */
r = CreateEnvironmentBlock(NULL, htok, FALSE);
expect(FALSE, r);
}
r = CreateEnvironmentBlock((LPVOID) &env1, NULL, FALSE);
expect(TRUE, r);