Commit 603822ca authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

kernel32: Fix two tests that fail in win9x.

parent 99949cb2
...@@ -98,7 +98,9 @@ static void test_FindFirstChangeNotification(void) ...@@ -98,7 +98,9 @@ static void test_FindFirstChangeNotification(void)
/* pathetic checks */ /* pathetic checks */
change = FindFirstChangeNotificationA("not-a-file", FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); change = FindFirstChangeNotificationA("not-a-file", FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);
ok(change == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_NOT_FOUND, ok(change == INVALID_HANDLE_VALUE, "Expected INVALID_HANDLE_VALUE, got %p\n", change);
ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
GetLastError() == ERROR_NO_MORE_FILES, /* win95 */
"FindFirstChangeNotification error: %d\n", GetLastError()); "FindFirstChangeNotification error: %d\n", GetLastError());
if (0) /* This documents win2k behavior. It crashes on win98. */ if (0) /* This documents win2k behavior. It crashes on win98. */
...@@ -152,17 +154,15 @@ static void test_FindFirstChangeNotification(void) ...@@ -152,17 +154,15 @@ static void test_FindFirstChangeNotification(void)
thread = StartNotificationThread(dirname1, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); thread = StartNotificationThread(dirname1, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME);
ret = MoveFileA(dirname1, dirname2); ret = MoveFileA(dirname1, dirname2);
ok(ret, "MoveFileA error: %d\n", GetLastError()); ok(ret, "MoveFileA error: %d\n", GetLastError());
ret = FinishNotificationThread(thread); /* win9x and win2k behave differently here, don't check result */
ok(!ret, "Unexpected notification\n"); FinishNotificationThread(thread);
/* What if we remove the directory we registered notification for? */ /* What if we remove the directory we registered notification for? */
thread = StartNotificationThread(dirname2, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); thread = StartNotificationThread(dirname2, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME);
ret = RemoveDirectoryA(dirname2); ret = RemoveDirectoryA(dirname2);
ok(ret, "RemoveDirectoryA error: %d\n", GetLastError()); ok(ret, "RemoveDirectoryA error: %d\n", GetLastError());
/* win9x and win2k behave differently here, don't check result */
/* win98 and win2k behave differently here */ FinishNotificationThread(thread);
ret = FinishNotificationThread(thread);
ok(ret || !ret, "You'll never read this\n");
/* functional checks */ /* functional checks */
......
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