Hans Leidekker : kernel: Test moving a directory that has a change
notification
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jan 25 06:22:28 CST 2006
Module: wine
Branch: refs/heads/master
Commit: b825b8ba3cb0178bd0e4e45031be76817957b4e0
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b825b8ba3cb0178bd0e4e45031be76817957b4e0
Author: Hans Leidekker <hans at it.vu.nl>
Date: Wed Jan 25 13:13:58 2006 +0100
kernel: Test moving a directory that has a change notification
registered for itself.
---
dlls/kernel/tests/change.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/kernel/tests/change.c b/dlls/kernel/tests/change.c
index 4e0877b..5afe4fe 100644
--- a/dlls/kernel/tests/change.c
+++ b/dlls/kernel/tests/change.c
@@ -136,12 +136,21 @@ static void test_FindFirstChangeNotifica
lstrcpyA(dirname1, filename1);
lstrcatA(dirname1, "dir");
+ lstrcpyA(dirname2, dirname1);
+ lstrcatA(dirname2, "new");
+
ret = CreateDirectoryA(dirname1, NULL);
ok(ret, "CreateDirectoryA error: %ld\n", GetLastError());
- /* What if we remove the directory we registered notification for? */
+ /* What if we move the directory we registered notification for? */
thread = StartNotificationThread(dirname1, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME);
- ret = RemoveDirectoryA(dirname1);
+ ret = MoveFileA(dirname1, dirname2);
+ ok(ret, "MoveFileA error: %ld\n", GetLastError());
+ ok(FinishNotificationThread(thread), "Missed notification\n");
+
+ /* What if we remove the directory we registered notification for? */
+ thread = StartNotificationThread(dirname2, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME);
+ ret = RemoveDirectoryA(dirname2);
ok(ret, "RemoveDirectoryA error: %ld\n", GetLastError());
/* win98 and win2k behave differently here */
@@ -156,9 +165,6 @@ static void test_FindFirstChangeNotifica
ok(ret, "CreateDirectoryA error: %ld\n", GetLastError());
ok(FinishNotificationThread(thread), "Missed notification\n");
- lstrcpyA(dirname2, dirname1);
- lstrcatA(dirname2, "new");
-
/* Rename a directory */
thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME);
ret = MoveFileA(dirname1, dirname2);
More information about the wine-cvs
mailing list