Add trailing '\n's to ok() calls (shell32)

Francois Gouget fgouget at free.fr
Sat Jan 24 13:57:21 CST 2004


Changelog:

 * dlls/kernel/tests/drive.c

   Add trailing '\n's to ok() calls.


Index: dlls/shell32/tests/shlfileop.c
===================================================================
RCS file: /home/cvs/wine/dlls/shell32/tests/shlfileop.c,v
retrieving revision 1.11
diff -u -r1.11 shlfileop.c
--- dlls/shell32/tests/shlfileop.c	16 Oct 2003 19:12:49 -0000	1.11
+++ dlls/shell32/tests/shlfileop.c	24 Jan 2004 12:48:26 -0000
@@ -36,11 +36,9 @@
 {
     HANDLE file;
     DWORD written;
-    CHAR msg[MAX_PATH];

     file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
-    sprintf(msg, "Failure to open file %s", name);
-    ok(file != INVALID_HANDLE_VALUE, msg);
+    ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name);
     WriteFile(file, name, strlen(name), &written, NULL);
     WriteFile(file, "\n", strlen("\n"), &written, NULL);
     CloseHandle(file);
@@ -119,33 +117,33 @@
     shfo.hNameMappings = NULL;
     shfo.lpszProgressTitle = NULL;

-    ok(!SHFileOperationA(&shfo), "Deletion was successful");
-    ok(file_exists(".\\test4.txt"), "Directory should not be removed");
-    ok(!file_exists(".\\test1.txt"), "File should be removed");
+    ok(!SHFileOperationA(&shfo), "Deletion was successful\n");
+    ok(file_exists(".\\test4.txt"), "Directory should not be removed\n");
+    ok(!file_exists(".\\test1.txt"), "File should be removed\n");

-    ok(!SHFileOperationA(&shfo), "Directory exists, but is not removed");
-    ok(file_exists(".\\test4.txt"), "Directory should not be removed");
+    ok(!SHFileOperationA(&shfo), "Directory exists, but is not removed\n");
+    ok(file_exists(".\\test4.txt"), "Directory should not be removed\n");

     shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI;

-    ok(!SHFileOperationA(&shfo), "Directory removed");
-    ok(!file_exists(".\\test4.txt"), "Directory should be removed");
+    ok(!SHFileOperationA(&shfo), "Directory removed\n");
+    ok(!file_exists(".\\test4.txt"), "Directory should be removed\n");

-    ok(!SHFileOperationA(&shfo), "The requested file does not exist");
+    ok(!SHFileOperationA(&shfo), "The requested file does not exist\n");

     init_shfo_tests();
     sprintf(buf, "%s\\%s", CURR_DIR, "test4.txt");
     buf[strlen(buf) + 1] = '\0';
-    ok(MoveFileA(".\\test1.txt", ".\\test4.txt\\test1.txt"), "Fill the subdirectory");
-    ok(!SHFileOperationA(&shfo), "Directory removed");
-    ok(!file_exists(".\\test4.txt"), "Directory is removed");
+    ok(MoveFileA(".\\test1.txt", ".\\test4.txt\\test1.txt"), "Fill the subdirectory\n");
+    ok(!SHFileOperationA(&shfo), "Directory removed\n");
+    ok(!file_exists(".\\test4.txt"), "Directory is removed\n");

     init_shfo_tests();
     shfo.pFrom = ".\\test1.txt\0.\\test4.txt\0";
-    ok(!SHFileOperationA(&shfo), "Directory and a file removed");
-    ok(!file_exists(".\\test1.txt"), "The file should be removed");
-    ok(!file_exists(".\\test4.txt"), "Directory should be removed");
-    ok(file_exists(".\\test2.txt"), "This file should not be removed");
+    ok(!SHFileOperationA(&shfo), "Directory and a file removed\n");
+    ok(!file_exists(".\\test1.txt"), "The file should be removed\n");
+    ok(!file_exists(".\\test4.txt"), "Directory should be removed\n");
+    ok(file_exists(".\\test2.txt"), "This file should not be removed\n");
 }

 /* tests the FO_RENAME action */
@@ -167,19 +165,19 @@
     set_curr_dir_path(from, "test1.txt\0");
     set_curr_dir_path(to, "test4.txt\0");
     ok(SHFileOperationA(&shfo), "File is not renamed moving to other directory "
-       "when specifying directory name only");
-    ok(file_exists(".\\test1.txt"), "The file is not removed");
+       "when specifying directory name only\n");
+    ok(file_exists(".\\test1.txt"), "The file is not removed\n");

     set_curr_dir_path(from, "test3.txt\0");
     set_curr_dir_path(to, "test4.txt\\test1.txt\0");
-    ok(!SHFileOperationA(&shfo), "File is renamed moving to other directory");
-    ok(file_exists(".\\test4.txt\\test1.txt"), "The file is renamed");
+    ok(!SHFileOperationA(&shfo), "File is renamed moving to other directory\n");
+    ok(file_exists(".\\test4.txt\\test1.txt"), "The file is renamed\n");

     set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0");
     set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0");
     retval = SHFileOperationA(&shfo); /* W98 returns 0, W2K and newer returns ERROR_GEN_FAILURE, both do nothing */
-    ok(!retval || retval == ERROR_GEN_FAILURE, "Can't rename many files, retval = %lx", retval);
-    ok(file_exists(".\\test1.txt"), "The file is not renamed - many files are specified ");
+    ok(!retval || retval == ERROR_GEN_FAILURE, "Can't rename many files, retval = %lx\n", retval);
+    ok(file_exists(".\\test1.txt"), "The file is not renamed - many files are specified\n");

     memcpy(&shfo2, &shfo, sizeof(SHFILEOPSTRUCTA));
     shfo2.fFlags |= FOF_MULTIDESTFILES;
@@ -187,26 +185,26 @@
     set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0");
     set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0");
     retval = SHFileOperationA(&shfo2); /* W98 returns 0, W2K and newer returns ERROR_GEN_FAILURE, both do nothing */
-    ok(!retval || retval == ERROR_GEN_FAILURE, "Can't rename many files, retval = %lx", retval);
-    ok(file_exists(".\\test1.txt"), "The file is not renamed - many files are specified ");
+    ok(!retval || retval == ERROR_GEN_FAILURE, "Can't rename many files, retval = %lx\n", retval);
+    ok(file_exists(".\\test1.txt"), "The file is not renamed - many files are specified\n");

     set_curr_dir_path(from, "test1.txt\0");
     set_curr_dir_path(to, "test6.txt\0");
-    ok(!SHFileOperationA(&shfo), "Rename file");
-    ok(!file_exists(".\\test1.txt"), "The file is renamed");
-    ok(file_exists(".\\test6.txt"), "The file is renamed");
+    ok(!SHFileOperationA(&shfo), "Rename file\n");
+    ok(!file_exists(".\\test1.txt"), "The file is renamed\n");
+    ok(file_exists(".\\test6.txt"), "The file is renamed\n");
     set_curr_dir_path(from, "test6.txt\0");
     set_curr_dir_path(to, "test1.txt\0");
-    ok(!SHFileOperationA(&shfo), "Rename file back");
+    ok(!SHFileOperationA(&shfo), "Rename file back\n");

     set_curr_dir_path(from, "test4.txt\0");
     set_curr_dir_path(to, "test6.txt\0");
-    ok(!SHFileOperationA(&shfo), "Rename dir");
-    ok(!file_exists(".\\test4.txt"), "The dir is renamed");
-    ok(file_exists(".\\test6.txt"), "The dir is renamed ");
+    ok(!SHFileOperationA(&shfo), "Rename dir\n");
+    ok(!file_exists(".\\test4.txt"), "The dir is renamed\n");
+    ok(file_exists(".\\test6.txt"), "The dir is renamed\n");
     set_curr_dir_path(from, "test6.txt\0");
     set_curr_dir_path(to, "test4.txt\0");
-    ok(!SHFileOperationA(&shfo), "Rename dir back");
+    ok(!SHFileOperationA(&shfo), "Rename dir back\n");
 }

 /* tests the FO_COPY action */
@@ -228,18 +226,18 @@

     set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0");
     set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0");
-    ok(SHFileOperationA(&shfo), "Can't copy many files");
+    ok(SHFileOperationA(&shfo), "Can't copy many files\n");
     ok(!file_exists(".\\test6.txt"), "The file is not copied - many files are "
-       "specified as a target");
+       "specified as a target\n");

     memcpy(&shfo2, &shfo, sizeof(SHFILEOPSTRUCTA));
     shfo2.fFlags |= FOF_MULTIDESTFILES;

     set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0");
     set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0");
-    ok(!SHFileOperationA(&shfo2), "Can't copy many files");
+    ok(!SHFileOperationA(&shfo2), "Can't copy many files\n");
     ok(file_exists(".\\test6.txt"), "The file is copied - many files are "
-       "specified as a target");
+       "specified as a target\n");
     DeleteFileA(".\\test6.txt");
     DeleteFileA(".\\test7.txt");
     RemoveDirectoryA(".\\test8.txt");
@@ -247,41 +245,41 @@
     /* number of sources do not correspond to number of targets */
     set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0");
     set_curr_dir_path(to, "test6.txt\0test7.txt\0");
-    ok(SHFileOperationA(&shfo2), "Can't copy many files");
+    ok(SHFileOperationA(&shfo2), "Can't copy many files\n");
     ok(!file_exists(".\\test6.txt"), "The file is not copied - many files are "
-       "specified as a target");
+       "specified as a target\n");

     set_curr_dir_path(from, "test1.txt\0");
     set_curr_dir_path(to, "test4.txt\0");
-    ok(!SHFileOperationA(&shfo), "Prepare test to check how directories are copied recursively");
-    ok(file_exists(".\\test4.txt\\test1.txt"), "The file is copied");
+    ok(!SHFileOperationA(&shfo), "Prepare test to check how directories are copied recursively\n");
+    ok(file_exists(".\\test4.txt\\test1.txt"), "The file is copied\n");

     set_curr_dir_path(from, "test?.txt\0");
     set_curr_dir_path(to, "testdir2\0");
-    ok(!file_exists(".\\testdir2\\test1.txt"), "The file is not copied yet");
-    ok(!file_exists(".\\testdir2\\test4.txt"), "The directory is not copied yet");
-    ok(!SHFileOperationA(&shfo), "Files and directories are copied to directory ");
-    ok(file_exists(".\\testdir2\\test1.txt"), "The file is copied");
-    ok(file_exists(".\\testdir2\\test4.txt"), "The directory is copied");
-    ok(file_exists(".\\testdir2\\test4.txt\\test1.txt"), "The file in subdirectory is copied");
+    ok(!file_exists(".\\testdir2\\test1.txt"), "The file is not copied yet\n");
+    ok(!file_exists(".\\testdir2\\test4.txt"), "The directory is not copied yet\n");
+    ok(!SHFileOperationA(&shfo), "Files and directories are copied to directory\n");
+    ok(file_exists(".\\testdir2\\test1.txt"), "The file is copied\n");
+    ok(file_exists(".\\testdir2\\test4.txt"), "The directory is copied\n");
+    ok(file_exists(".\\testdir2\\test4.txt\\test1.txt"), "The file in subdirectory is copied\n");
     clean_after_shfo_tests();

     init_shfo_tests();
     shfo.fFlags |= FOF_FILESONLY;
-    ok(!file_exists(".\\testdir2\\test1.txt"), "The file is not copied yet");
-    ok(!file_exists(".\\testdir2\\test4.txt"), "The directory is not copied yet");
-    ok(!SHFileOperationA(&shfo), "Files are copied to other directory ");
-    ok(file_exists(".\\testdir2\\test1.txt"), "The file is copied");
-    ok(!file_exists(".\\testdir2\\test4.txt"), "The directory is copied");
+    ok(!file_exists(".\\testdir2\\test1.txt"), "The file is not copied yet\n");
+    ok(!file_exists(".\\testdir2\\test4.txt"), "The directory is not copied yet\n");
+    ok(!SHFileOperationA(&shfo), "Files are copied to other directory\n");
+    ok(file_exists(".\\testdir2\\test1.txt"), "The file is copied\n");
+    ok(!file_exists(".\\testdir2\\test4.txt"), "The directory is copied\n");
     clean_after_shfo_tests();

     init_shfo_tests();
     set_curr_dir_path(from, "test1.txt\0test2.txt\0");
-    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(!SHFileOperationA(&shfo), "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\\test1.txt"), "The file is not copied yet\n");
+    ok(!file_exists(".\\testdir2\\test2.txt"), "The file is not copied yet\n");
+    ok(!SHFileOperationA(&shfo), "Files are copied to other directory \n");
+    ok(file_exists(".\\testdir2\\test1.txt"), "The file is copied\n");
+    ok(file_exists(".\\testdir2\\test2.txt"), "The file is copied\n");
     clean_after_shfo_tests();

     /* Copying multiple files with one not existing as source, fails the
@@ -289,19 +287,19 @@
     init_shfo_tests();
     tmp_flags = shfo.fFlags;
     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\\test2.txt"), "The file is not copied yet");
+    ok(!file_exists(".\\testdir2\\test1.txt"), "The file is not copied yet\n");
+    ok(!file_exists(".\\testdir2\\test2.txt"), "The file is not copied yet\n");
     retval = SHFileOperationA(&shfo);
     if (!retval)
       /* Win 95/NT returns success but copies only the files up to the non-existent source */
-      ok(file_exists(".\\testdir2\\test1.txt"), "The file is not copied");
+      ok(file_exists(".\\testdir2\\test1.txt"), "The file is not copied\n");
     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(retval == 1026, "Files are copied to other directory\n");
+      ok(!file_exists(".\\testdir2\\test1.txt"), "The file is copied\n");
     }
-    ok(!file_exists(".\\testdir2\\test2.txt"), "The file is copied");
+    ok(!file_exists(".\\testdir2\\test2.txt"), "The file is copied\n");
     shfo.fFlags = tmp_flags;
 }

@@ -322,17 +320,17 @@

     set_curr_dir_path(from, "test1.txt\0");
     set_curr_dir_path(to, "test4.txt\0");
-    ok(!SHFileOperationA(&shfo), "Prepare test to check how directories are moved recursively");
-    ok(file_exists(".\\test4.txt\\test1.txt"), "The file is moved");
+    ok(!SHFileOperationA(&shfo), "Prepare test to check how directories are moved recursively\n");
+    ok(file_exists(".\\test4.txt\\test1.txt"), "The file is moved\n");

     set_curr_dir_path(from, "test?.txt\0");
     set_curr_dir_path(to, "testdir2\0");
-    ok(!file_exists(".\\testdir2\\test2.txt"), "The file is not moved yet");
-    ok(!file_exists(".\\testdir2\\test4.txt"), "The directory is not moved yet");
-    ok(!SHFileOperationA(&shfo), "Files and directories are moved to directory ");
-    ok(file_exists(".\\testdir2\\test2.txt"), "The file is moved");
-    ok(file_exists(".\\testdir2\\test4.txt"), "The directory is moved");
-    ok(file_exists(".\\testdir2\\test4.txt\\test1.txt"), "The file in subdirectory is moved");
+    ok(!file_exists(".\\testdir2\\test2.txt"), "The file is not moved yet\n");
+    ok(!file_exists(".\\testdir2\\test4.txt"), "The directory is not moved yet\n");
+    ok(!SHFileOperationA(&shfo), "Files and directories are moved to directory\n");
+    ok(file_exists(".\\testdir2\\test2.txt"), "The file is moved\n");
+    ok(file_exists(".\\testdir2\\test4.txt"), "The directory is moved\n");
+    ok(file_exists(".\\testdir2\\test4.txt\\test1.txt"), "The file in subdirectory is moved\n");

     clean_after_shfo_tests();
     init_shfo_tests();
@@ -342,9 +340,9 @@

     set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0");
     set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0");
-    ok(!SHFileOperationA(&shfo2), "Move many files");
+    ok(!SHFileOperationA(&shfo2), "Move many files\n");
     ok(file_exists(".\\test6.txt"), "The file is moved - many files are "
-       "specified as a target");
+       "specified as a target\n");
     DeleteFileA(".\\test6.txt");
     DeleteFileA(".\\test7.txt");
     RemoveDirectoryA(".\\test8.txt");
@@ -354,40 +352,40 @@
     /* number of sources do not correspond to number of targets */
     set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0");
     set_curr_dir_path(to, "test6.txt\0test7.txt\0");
-    ok(SHFileOperationA(&shfo2), "Can't move many files");
+    ok(SHFileOperationA(&shfo2), "Can't move many files\n");
     ok(!file_exists(".\\test6.txt"), "The file is not moved - many files are "
-       "specified as a target");
+       "specified as a target\n");

     init_shfo_tests();

     set_curr_dir_path(from, "test3.txt\0");
     set_curr_dir_path(to, "test4.txt\\test1.txt\0");
-    ok(!SHFileOperationA(&shfo), "File is moved moving to other directory");
-    ok(file_exists(".\\test4.txt\\test1.txt"), "The file is moved");
+    ok(!SHFileOperationA(&shfo), "File is moved moving to other directory\n");
+    ok(file_exists(".\\test4.txt\\test1.txt"), "The file is moved\n");

     set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0");
     set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0");
-    ok(SHFileOperationA(&shfo), "Can not move many files");
-    ok(file_exists(".\\test1.txt"), "The file is not moved. Many files are specified ");
-    ok(file_exists(".\\test4.txt"), "The directory not is moved. Many files are specified ");
+    ok(SHFileOperationA(&shfo), "Can not move many files\n");
+    ok(file_exists(".\\test1.txt"), "The file is not moved. Many files are specified\n");
+    ok(file_exists(".\\test4.txt"), "The directory not is moved. Many files are specified\n");

     set_curr_dir_path(from, "test1.txt\0");
     set_curr_dir_path(to, "test6.txt\0");
-    ok(!SHFileOperationA(&shfo), "Move file");
-    ok(!file_exists(".\\test1.txt"), "The file is moved");
-    ok(file_exists(".\\test6.txt"), "The file is moved ");
+    ok(!SHFileOperationA(&shfo), "Move file\n");
+    ok(!file_exists(".\\test1.txt"), "The file is moved\n");
+    ok(file_exists(".\\test6.txt"), "The file is moved\n");
     set_curr_dir_path(from, "test6.txt\0");
     set_curr_dir_path(to, "test1.txt\0");
-    ok(!SHFileOperationA(&shfo), "Move file back");
+    ok(!SHFileOperationA(&shfo), "Move file back\n");

     set_curr_dir_path(from, "test4.txt\0");
     set_curr_dir_path(to, "test6.txt\0");
-    ok(!SHFileOperationA(&shfo), "Move dir");
-    ok(!file_exists(".\\test4.txt"), "The dir is moved");
-    ok(file_exists(".\\test6.txt"), "The dir is moved ");
+    ok(!SHFileOperationA(&shfo), "Move dir\n");
+    ok(!file_exists(".\\test4.txt"), "The dir is moved\n");
+    ok(file_exists(".\\test6.txt"), "The dir is moved\n");
     set_curr_dir_path(from, "test6.txt\0");
     set_curr_dir_path(to, "test4.txt\0");
-    ok(!SHFileOperationA(&shfo), "Move dir back");
+    ok(!SHFileOperationA(&shfo), "Move dir back\n");
 }

 START_TEST(shlfileop)



-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
     We are Pentium of Borg. You will be approximated. Division is futile.



More information about the wine-patches mailing list