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

kernel32/tests: Win9x doesn't change last error.

parent f9e5296c
......@@ -59,22 +59,28 @@ static void test_GetVersionEx(void)
memset(&infoA,0,sizeof infoA);
ret = GetVersionExA(&infoA);
ok(!ret, "Expected GetVersionExA to fail\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
GetLastError() == 0xdeadbeef /* Win9x */,
"Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n",
GetLastError());
SetLastError(0xdeadbeef);
infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA) / 2;
ret = GetVersionExA(&infoA);
ok(!ret, "Expected GetVersionExA to fail\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
GetLastError() == 0xdeadbeef /* Win9x */,
"Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n",
GetLastError());
SetLastError(0xdeadbeef);
infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA) * 2;
ret = GetVersionExA(&infoA);
ok(!ret, "Expected GetVersionExA to fail\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
GetLastError() == 0xdeadbeef /* Win9x */,
"Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n",
GetLastError());
SetLastError(0xdeadbeef);
infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
......
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