kernel32/tests: remove win9x hacks
Austin English
austinenglish at gmail.com
Wed Feb 23 03:15:42 CST 2011
--
-Austin
-------------- next part --------------
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
index 741f47f..ef6c63c 100644
--- a/dlls/kernel32/tests/path.c
+++ b/dlls/kernel32/tests/path.c
@@ -1564,8 +1564,7 @@ static void test_SearchPathA(void)
SetLastError(0xdeadbeef);
ret = pSearchPathA(pathA, fileA, NULL, sizeof(buffA)/sizeof(CHAR), buffA, &ptrA);
ok(ret == 0, "Expected failure, got %d\n", ret);
- ok(GetLastError() == ERROR_INVALID_PARAMETER ||
- broken(GetLastError() == ERROR_FILE_NOT_FOUND) /* win9x */,
+ ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError());
}
@@ -1581,16 +1580,6 @@ static void test_SearchPathW(void)
return;
}
- /* SearchPathW is a stub on win9x and doesn't return sane error,
- so quess if it's implemented indirectly */
- SetLastError(0xdeadbeef);
- GetWindowsDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR));
- if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
- {
- win_skip("SearchPathW not implemented\n");
- return;
- }
-
if (0)
{
/* NULL filename, crashes on nt4 */
@@ -1609,7 +1598,7 @@ static void test_GetFullPathNameA(void)
{
char output[MAX_PATH], *filepart;
DWORD ret;
- int is_win9x, i;
+ int i;
const struct
{
@@ -1617,13 +1606,12 @@ static void test_GetFullPathNameA(void)
DWORD len;
LPSTR buffer;
LPSTR *lastpart;
- int win9x_crash;
} invalid_parameters[] =
{
- {NULL, 0, NULL, NULL, 1},
- {NULL, MAX_PATH, NULL, NULL, 1},
- {NULL, MAX_PATH, output, NULL, 1},
- {NULL, MAX_PATH, output, &filepart, 1},
+ {NULL, 0, NULL, NULL},
+ {NULL, MAX_PATH, NULL, NULL},
+ {NULL, MAX_PATH, output, NULL},
+ {NULL, MAX_PATH, output, &filepart},
{"", 0, NULL, NULL},
{"", MAX_PATH, NULL, NULL},
{"", MAX_PATH, output, NULL},
@@ -1632,16 +1620,9 @@ static void test_GetFullPathNameA(void)
SetLastError(0xdeadbeef);
ret = GetFullPathNameW(NULL, 0, NULL, NULL);
- is_win9x = !ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED;
-
- if (is_win9x)
- win_skip("Skipping some tests that cause GetFullPathNameA to crash on Win9x\n");
for (i = 0; i < sizeof(invalid_parameters)/sizeof(invalid_parameters[0]); i++)
{
- if (is_win9x && invalid_parameters[i].win9x_crash)
- continue;
-
SetLastError(0xdeadbeef);
strcpy(output, "deadbeef");
filepart = (char *)0xdeadbeef;
@@ -1653,7 +1634,6 @@ static void test_GetFullPathNameA(void)
ok(!strcmp(output, "deadbeef"), "[%d] Expected the output buffer to be unchanged, got \"%s\"\n", i, output);
ok(filepart == (char *)0xdeadbeef, "[%d] Expected output file part pointer to be untouched, got %p\n", i, filepart);
ok(GetLastError() == 0xdeadbeef ||
- GetLastError() == ERROR_BAD_PATHNAME || /* Win9x */
GetLastError() == ERROR_INVALID_NAME, /* Win7 */
"[%d] Expected GetLastError() to return 0xdeadbeef, got %u\n",
i, GetLastError());
More information about the wine-patches
mailing list