Make the tests silent on success.

2005-07-14  Matthias Clasen  <mclasen@redhat.com>

	* tests/spawn-test.c:
	* tests/uri-test.c:
	* tests/thread-test.c:
	* tests/queue-test.c:
	* tests/mainloop-test.c:
	* tests/iochannel-test.c:
	* tests/gio-test.c:
	* tests/child-test.c: Make the tests silent on success.
This commit is contained in:
Matthias Clasen
2005-07-14 05:20:14 +00:00
committed by Matthias Clasen
parent b36f775177
commit 7221f500f5
12 changed files with 120 additions and 44 deletions

View File

@@ -49,27 +49,31 @@ run_tests (void)
gchar **argv = 0;
#endif
printf ("The following errors are supposed to occur:\n");
err = NULL;
if (!g_spawn_command_line_sync ("nonexistent_application foo 'bar baz' blah blah",
NULL, NULL, NULL,
&err))
{
fprintf (stderr, "Error (normal, supposed to happen): %s\n", err->message);
g_error_free (err);
}
else
{
g_warning ("no error for sync spawn of nonexistent application");
exit (1);
}
err = NULL;
if (!g_spawn_command_line_async ("nonexistent_application foo bar baz \"blah blah\"",
&err))
{
fprintf (stderr, "Error (normal, supposed to happen): %s\n", err->message);
g_error_free (err);
}
else
{
g_warning ("no error for async spawn of nonexistent application");
exit (1);
}
printf ("Errors after this are not supposed to happen:\n");
err = NULL;
#ifdef G_OS_UNIX
if (!g_spawn_command_line_sync ("/bin/sh -c 'echo hello'",