From: "Erich E. Hoover" Subject: [PATCH 7/7] ntdll/tests: Add test for deleting junction point target. Message-Id: Date: Wed, 20 Jun 2012 17:33:45 -0600 This patch demonstrates that deleting the target of a junction point does not affect the junction point itself. From 19338c680c65ee41d2692d577f21cf49318273b4 Mon Sep 17 00:00:00 2001 From: Erich Hoover Date: Wed, 20 Jun 2012 17:22:36 -0600 Subject: ntdll/tests: Add test for deleting junction point target. --- dlls/ntdll/tests/file.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 0ff6046..943268e 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -1859,6 +1859,17 @@ static void test_junction_points(void) ok(dwret != (DWORD)~0, "Junction point doesn't exist (attributes: 0x%x)!\n", dwret); ok(dwret & FILE_ATTRIBUTE_REPARSE_POINT, "File is not a junction point! (attributes: 0x%x)\n", dwret); + /* Test deleting a junction point's target */ + dwret = GetFileAttributesW(junction_path); + ok(dwret == 0x410 || broken(dwret == 0x430) /* win2k */, + "Unexpected junction point attributes (0x%x != 0x410)!\n", dwret); + bret = RemoveDirectoryW(target_path); + ok(bret, "Failed to delete junction point target!\n"); + ok(dwret == 0x410 || broken(dwret == 0x430) /* win2k */, + "Unexpected junction point attributes (0x%x != 0x410)!\n", dwret); + bret = CreateDirectoryW(target_path, NULL); + ok(bret, "Failed to create junction point target directory.\n"); + cleanup: /* Cleanup */ pRtlFreeUnicodeString( &nameW ); -- 1.7.5.4