diff --git a/glib/tests/spawn-test-win32-gui.c b/glib/tests/spawn-test-win32-gui.c index 34945f524..46353c8f3 100644 --- a/glib/tests/spawn-test-win32-gui.c +++ b/glib/tests/spawn-test-win32-gui.c @@ -26,7 +26,7 @@ WinMain (struct HINSTANCE__ *hInstance, } else if (__argc <= 2) { - printf ("This is stdout\n"); + printf ("# This is stdout\n"); fflush (stdout); fprintf (stderr, "This is stderr\n"); @@ -41,36 +41,36 @@ WinMain (struct HINSTANCE__ *hInstance, if (infd < 0 || outfd < 0) { - printf ("spawn-test-win32-gui: illegal fds on command line %s", + fprintf (stderr, "spawn-test-win32-gui: illegal fds on command line %s\n", lpszCmdLine); exit (1); } n = strlen ("Hello there"); if (write (outfd, &n, sizeof (n)) == -1 || - write (outfd, "Hello there", n) == -1) + write (outfd, "Hello there\n", n) == -1) { int errsv = errno; - printf ("spawn-test-win32-gui: Write error: %s", strerror (errsv)); + fprintf (stderr, "spawn-test-win32-gui: Write error: %s\n", strerror (errsv)); exit (1); } if ((k = read (infd, &n, sizeof (n))) != sizeof (n)) { - printf ("spawn-test-win32-gui: Got only %d bytes, wanted %d", + fprintf (stderr, "spawn-test-win32-gui: Got only %d bytes, wanted %d\n", k, (int)sizeof (n)); exit (1); } - printf ("spawn-test-win32-gui: Parent says %d bytes to read", n); + fprintf (stderr, "spawn-test-win32-gui: Parent says %d bytes to read\n", n); if ((k = read (infd, buf, n)) != n) { int errsv = errno; if (k == -1) - printf ("spawn-test-win32-gui: Read error: %s", strerror (errsv)); + fprintf (stderr, "spawn-test-win32-gui: Read error: %s\n", strerror (errsv)); else - printf ("spawn-test-win32-gui: Got only %d bytes", k); + fprintf (stderr, "spawn-test-win32-gui: Got only %d bytes\n", k); exit (1); } @@ -79,7 +79,7 @@ WinMain (struct HINSTANCE__ *hInstance, write (outfd, "See ya", n) == -1) { int errsv = errno; - printf ("spawn-test-win32-gui: Write error: %s", strerror (errsv)); + fprintf (stderr, "spawn-test-win32-gui: Write error: %s\n", strerror (errsv)); exit (1); } } diff --git a/glib/tests/spawn-test.c b/glib/tests/spawn-test.c index 2e39aca8c..32c37a646 100644 --- a/glib/tests/spawn-test.c +++ b/glib/tests/spawn-test.c @@ -136,7 +136,7 @@ test_spawn_basics (void) g_test_message ("Running spawn-test-win32-gui in various ways."); g_test_message ("First asynchronously (without wait)."); - g_snprintf (full_cmdline, sizeof (full_cmdline), "'%s' 1", spawn_binary); + g_snprintf (full_cmdline, sizeof (full_cmdline), "'%s'", spawn_binary); result = g_spawn_command_line_async (full_cmdline, &err); g_assert_no_error (err); g_assert_true (result); @@ -148,7 +148,7 @@ test_spawn_basics (void) g_assert_no_error (err); g_assert_true (result); - g_assert_cmpstr (output, ==, "This is stdout\r\n"); + g_assert_cmpstr (output, ==, "# This is stdout\r\n"); g_assert_cmpstr (erroutput, ==, "This is stderr\r\n"); g_free (output);