Commit 48a01aeb authored by Rolf Kalbermatter's avatar Rolf Kalbermatter Committed by Alexandre Julliard

Fix test to succeed in Win 98/2K and most probably ME/XP as well.

parent 6f7a2044
...@@ -211,6 +211,7 @@ void test_copy(void) ...@@ -211,6 +211,7 @@ void test_copy(void)
CHAR from[MAX_PATH]; CHAR from[MAX_PATH];
CHAR to[MAX_PATH]; CHAR to[MAX_PATH];
FILEOP_FLAGS tmp_flags; FILEOP_FLAGS tmp_flags;
DWORD retval;
shfo.hwnd = NULL; shfo.hwnd = NULL;
shfo.wFunc = FO_COPY; shfo.wFunc = FO_COPY;
...@@ -278,13 +279,23 @@ void test_copy(void) ...@@ -278,13 +279,23 @@ void test_copy(void)
ok(file_exists(".\\testdir2\\test2.txt"), "The file is copied"); ok(file_exists(".\\testdir2\\test2.txt"), "The file is copied");
clean_after_shfo_tests(); clean_after_shfo_tests();
/* Copying multiple files with one not existing as source, fails the
entire operation in Win98/ME/2K/XP, but not in 95/NT */
init_shfo_tests(); init_shfo_tests();
tmp_flags = shfo.fFlags; tmp_flags = shfo.fFlags;
set_curr_dir_path(from, "test1.txt\0test10.txt\0test2.txt\0"); set_curr_dir_path(from, "test1.txt\0test10.txt\0test2.txt\0");
ok(!file_exists(".\\testdir2\\test1.txt"), "The file is not copied yet"); ok(!file_exists(".\\testdir2\\test1.txt"), "The file is not copied yet");
ok(!file_exists(".\\testdir2\\test2.txt"), "The file is not copied yet"); ok(!file_exists(".\\testdir2\\test2.txt"), "The file is not copied yet");
ok(!SHFileOperationA(&shfo), "Files are copied to other directory "); retval = SHFileOperationA(&shfo);
ok(file_exists(".\\testdir2\\test1.txt"), "The file is copied"); if (!retval)
/* Win 95/NT returns success but copies only the files up to the nonexisting source */
ok(file_exists(".\\testdir2\\test1.txt"), "The file is not copied");
else
{
/* Win 98/ME/2K/XP fail the entire operation with return code 1026 if one source file does not exist */
ok(retval == 1026, "Files are copied to other directory ");
ok(!file_exists(".\\testdir2\\test1.txt"), "The file is copied");
}
ok(!file_exists(".\\testdir2\\test2.txt"), "The file is copied"); ok(!file_exists(".\\testdir2\\test2.txt"), "The file is copied");
shfo.fFlags = tmp_flags; shfo.fFlags = tmp_flags;
} }
......
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