From 8c523fe36cc197a6111241c9a7495ddb147064d8 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Tue, 11 Oct 2005 19:26:47 +0000 Subject: [PATCH] Test that the FO_COPY action creates output directories if they don't exist. --- dlls/shell32/tests/shlfileop.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index 03b197d3233..f4509d2cf65 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -95,6 +95,8 @@ static void clean_after_shfo_tests(void) DeleteFileA(".\\testdir2\\test4.txt\\test1.txt"); RemoveDirectoryA(".\\testdir2\\test4.txt"); RemoveDirectoryA(".\\testdir2"); + DeleteFileA(".\\nonexistent\\test2.txt"); + RemoveDirectoryA(".\\nonexistent"); } /* @@ -331,6 +333,19 @@ static void test_copy(void) } ok(!file_exists(".\\testdir2\\test2.txt"), "The file is copied\n"); shfo.fFlags = tmp_flags; + + /* copy into a nonexistent directory */ + init_shfo_tests(); + shfo.fFlags = FOF_NOCONFIRMMKDIR; + set_curr_dir_path(from, "test1.txt\0"); + set_curr_dir_path(to, "nonexistent\\test2.txt\0"); + retval= SHFileOperation(&shfo); + + todo_wine + { + ok(!retval, "Error copying into nonexistent directory\n"); + ok(file_exists(".\\nonexistent\\test2.txt"), "Directory not created\n"); + } } /* tests the FO_MOVE action */