Add trailing '\n's to ok() calls (kernel 3)

Francois Gouget fgouget at free.fr
Fri Jan 23 10:59:08 CST 2004


Changelog:

 * dlls/kernel/tests/environ.c

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


Index: dlls/kernel/tests/environ.c
===================================================================
RCS file: /home/cvs/wine/dlls/kernel/tests/environ.c,v
retrieving revision 1.6
diff -u -r1.6 environ.c
--- dlls/kernel/tests/environ.c	5 Sep 2003 23:08:36 -0000	1.6
+++ dlls/kernel/tests/environ.c	23 Jan 2004 12:41:14 -0000
@@ -36,58 +36,58 @@

     ret = SetEnvironmentVariableA(name, value);
     ok(ret == TRUE,
-       "unexpected error in SetEnvironmentVariableA, GetLastError=%ld",
+       "unexpected error in SetEnvironmentVariableA, GetLastError=%ld\n",
        GetLastError());

     /* Try to retrieve the environment variable we just set */
     ret_size = GetEnvironmentVariableA(name, NULL, 0);
     ok(ret_size == strlen(value) + 1,
-       "should return length with terminating 0 ret_size=%ld", ret_size);
+       "should return length with terminating 0 ret_size=%ld\n", ret_size);

     lstrcpyA(buf, "foo");
     ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value));
-    ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer");
+    ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n");
     ok(ret_size == strlen(value) + 1,
-       "should return length with terminating 0 ret_size=%ld", ret_size);
+       "should return length with terminating 0 ret_size=%ld\n", ret_size);

     lstrcpyA(buf, "foo");
     ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1);
-    ok(lstrcmpA(buf, value) == 0, "should touch the buffer");
+    ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n");
     ok(ret_size == strlen(value),
-       "should return length without terminating 0 ret_size=%ld", ret_size);
+       "should return length without terminating 0 ret_size=%ld\n", ret_size);

     lstrcpyA(buf, "foo");
     ret_size = GetEnvironmentVariableA(name_cased, buf, lstrlenA(value) + 1);
-    ok(lstrcmpA(buf, value) == 0, "should touch the buffer");
+    ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n");
     ok(ret_size == strlen(value),
-       "should return length without terminating 0 ret_size=%ld", ret_size);
+       "should return length without terminating 0 ret_size=%ld\n", ret_size);

     /* Remove that environment variable */
     ret = SetEnvironmentVariableA(name_cased, NULL);
-    ok(ret == TRUE, "should erase existing variable");
+    ok(ret == TRUE, "should erase existing variable\n");

     lstrcpyA(buf, "foo");
     ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1);
-    ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer");
+    ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n");
     ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
-       "should not find variable but ret_size=%ld GetLastError=%ld",
+       "should not find variable but ret_size=%ld GetLastError=%ld\n",
        ret_size, GetLastError());

     /* Check behavior of SetEnvironmentVariableA(name, "") */
     ret = SetEnvironmentVariableA(name, value);
     ok(ret == TRUE,
-       "unexpected error in SetEnvironmentVariableA, GetLastError=%ld",
+       "unexpected error in SetEnvironmentVariableA, GetLastError=%ld\n",
        GetLastError());

     lstrcpyA(buf, "foo");
     ret_size = GetEnvironmentVariableA(name_cased, buf, lstrlenA(value) + 1);
-    ok(lstrcmpA(buf, value) == 0, "should touch the buffer");
+    ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n");
     ok(ret_size == strlen(value),
-       "should return length without terminating 0 ret_size=%ld", ret_size);
+       "should return length without terminating 0 ret_size=%ld\n", ret_size);

     ret = SetEnvironmentVariableA(name_cased, "");
     ok(ret == TRUE,
-       "should not fail with empty value but GetLastError=%ld", GetLastError());
+       "should not fail with empty value but GetLastError=%ld\n", GetLastError());

     lstrcpyA(buf, "foo");
     SetLastError(0);
@@ -95,23 +95,23 @@
     ok(ret_size == 0 &&
        ((GetLastError() == 0 && lstrcmpA(buf, "") == 0) ||
         (GetLastError() == ERROR_ENVVAR_NOT_FOUND)),
-       "%s should be set to \"\" (NT) or removed (Win9x) but ret_size=%ld GetLastError=%ld and buf=%s",
+       "%s should be set to \"\" (NT) or removed (Win9x) but ret_size=%ld GetLastError=%ld and buf=%s\n",
        name, ret_size, GetLastError(), buf);

     /* Test the limits */
     ret_size = GetEnvironmentVariableA(NULL, NULL, 0);
     ok(ret_size == 0 && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND),
-       "should not find variable but ret_size=%ld GetLastError=%ld",
+       "should not find variable but ret_size=%ld GetLastError=%ld\n",
        ret_size, GetLastError());

     ret_size = GetEnvironmentVariableA(NULL, buf, lstrlenA(value) + 1);
     ok(ret_size == 0 && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND),
-       "should not find variable but ret_size=%ld GetLastError=%ld",
+       "should not find variable but ret_size=%ld GetLastError=%ld\n",
        ret_size, GetLastError());

     ret_size = GetEnvironmentVariableA("", buf, lstrlenA(value) + 1);
     ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
-       "should not find variable but ret_size=%ld GetLastError=%ld",
+       "should not find variable but ret_size=%ld GetLastError=%ld\n",
        ret_size, GetLastError());
 }

@@ -133,81 +133,81 @@
         return;
     }
     ok(ret == TRUE,
-       "unexpected error in SetEnvironmentVariableW, GetLastError=%ld",
+       "unexpected error in SetEnvironmentVariableW, GetLastError=%ld\n",
        GetLastError());

     /* Try to retrieve the environment variable we just set */
     ret_size = GetEnvironmentVariableW(name, NULL, 0);
     ok(ret_size == lstrlenW(value) + 1,
-       "should return length with terminating 0 ret_size=%ld",
+       "should return length with terminating 0 ret_size=%ld\n",
        ret_size);

     lstrcpyW(buf, fooW);
     ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value));
-    ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer");
+    ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n");

     ok(ret_size == lstrlenW(value) + 1,
-       "should return length with terminating 0 ret_size=%ld", ret_size);
+       "should return length with terminating 0 ret_size=%ld\n", ret_size);

     lstrcpyW(buf, fooW);
     ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1);
-    ok(lstrcmpW(buf, value) == 0, "should touch the buffer");
+    ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n");
     ok(ret_size == lstrlenW(value),
-       "should return length without terminating 0 ret_size=%ld", ret_size);
+       "should return length without terminating 0 ret_size=%ld\n", ret_size);

     lstrcpyW(buf, fooW);
     ret_size = GetEnvironmentVariableW(name_cased, buf, lstrlenW(value) + 1);
-    ok(lstrcmpW(buf, value) == 0, "should touch the buffer");
+    ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n");
     ok(ret_size == lstrlenW(value),
-       "should return length without terminating 0 ret_size=%ld", ret_size);
+       "should return length without terminating 0 ret_size=%ld\n", ret_size);

     /* Remove that environment variable */
     ret = SetEnvironmentVariableW(name_cased, NULL);
-    ok(ret == TRUE, "should erase existing variable");
+    ok(ret == TRUE, "should erase existing variable\n");

     lstrcpyW(buf, fooW);
     ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1);
-    ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer");
+    ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n");
     ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
-       "should not find variable but ret_size=%ld GetLastError=%ld",
+       "should not find variable but ret_size=%ld GetLastError=%ld\n",
        ret_size, GetLastError());

     /* Check behavior of SetEnvironmentVariableW(name, "") */
     ret = SetEnvironmentVariableW(name, value);
     ok(ret == TRUE,
-       "unexpected error in SetEnvironmentVariableW, GetLastError=%ld",
+       "unexpected error in SetEnvironmentVariableW, GetLastError=%ld\n",
        GetLastError());

     lstrcpyW(buf, fooW);
     ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1);
-    ok(lstrcmpW(buf, value) == 0, "should touch the buffer");
+    ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n");
     ok(ret_size == lstrlenW(value),
-       "should return length without terminating 0 ret_size=%ld", ret_size);
+       "should return length without terminating 0 ret_size=%ld\n", ret_size);

     ret = SetEnvironmentVariableW(name_cased, empty_strW);
-    ok(ret == TRUE, "should not fail with empty value but GetLastError=%ld", GetLastError());
+    ok(ret == TRUE, "should not fail with empty value but GetLastError=%ld\n", GetLastError());

     lstrcpyW(buf, fooW);
     ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1);
     ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
-       "should not find variable but ret_size=%ld GetLastError=%ld",
+       "should not find variable but ret_size=%ld GetLastError=%ld\n",
        ret_size, GetLastError());
-    ok(lstrcmpW(buf, empty_strW) == 0, "should copy an empty string");
+    ok(lstrcmpW(buf, empty_strW) == 0, "should copy an empty string\n");

     /* Test the limits */
     ret_size = GetEnvironmentVariableW(NULL, NULL, 0);
     ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
-       "should not find variable but ret_size=%ld GetLastError=%ld",
+       "should not find variable but ret_size=%ld GetLastError=%ld\n",
        ret_size, GetLastError());

     ret_size = GetEnvironmentVariableW(NULL, buf, lstrlenW(value) + 1);
     ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND,
-       "should not find variable but ret_size=%ld GetLastError=%ld",
+       "should not find variable but ret_size=%ld GetLastError=%ld\n",
        ret_size, GetLastError());

     ret = SetEnvironmentVariableW(NULL, NULL);
     ok(ret == FALSE && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND),
-       "should fail with NULL, NULL but ret=%d and GetLastError=%ld",
+       "should fail with NULL, NULL but ret=%d and GetLastError=%ld\n",
        ret, GetLastError());
 }


-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                              145 = 1! + 4! + 5!



More information about the wine-patches mailing list