testsuite/debug/commandline.c: Call ./commandline, not argv[0]. Calling yourself is probably not the best way to con...

Original commit message from CVS:
* testsuite/debug/commandline.c: (main): Call ./commandline, not
argv[0].  Calling yourself is probably not the best way to
construct a test like this, btw.
This commit is contained in:
David Schleef 2004-05-18 22:49:52 +00:00
parent 69b959e726
commit cfe5791765
3 changed files with 16 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2004-05-18 David Schleef <ds@schleef.org>
* testsuite/debug/commandline.c: (main): Call ./commandline, not
argv[0]. Calling yourself is probably not the best way to
construct a test like this, btw.
2004-05-18 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/gstbin.c: (gst_bin_iterate_func), (gst_bin_iterate):

View file

@ -59,10 +59,12 @@ main (gint argc, gchar * argv[])
runs = G_N_ELEMENTS (lines);
for (i = 0; i < runs; i++) {
command = g_strdup_printf ("%s %s %d", argv[0], lines[i], i);
int ret;
command = g_strdup_printf ("./commandline %s %d", lines[i], i);
g_print ("running \"%s\"\n", command);
g_assert (g_spawn_command_line_sync (command, NULL, NULL, &exit,
NULL) == TRUE);
ret = g_spawn_command_line_sync (command, NULL, NULL, &exit, NULL);
g_assert (ret == TRUE);
g_assert (exit == 0);
g_print ("\"%s\" worked as expected.\n", command);
g_free (command);

View file

@ -59,10 +59,12 @@ main (gint argc, gchar * argv[])
runs = G_N_ELEMENTS (lines);
for (i = 0; i < runs; i++) {
command = g_strdup_printf ("%s %s %d", argv[0], lines[i], i);
int ret;
command = g_strdup_printf ("./commandline %s %d", lines[i], i);
g_print ("running \"%s\"\n", command);
g_assert (g_spawn_command_line_sync (command, NULL, NULL, &exit,
NULL) == TRUE);
ret = g_spawn_command_line_sync (command, NULL, NULL, &exit, NULL);
g_assert (ret == TRUE);
g_assert (exit == 0);
g_print ("\"%s\" worked as expected.\n", command);
g_free (command);