From cfe5791765dc7735498ba50bac2f3ef6e1880471 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 18 May 2004 22:49:52 +0000 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ tests/old/testsuite/debug/commandline.c | 8 +++++--- testsuite/debug/commandline.c | 8 +++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05b552d..f820d86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-05-18 David Schleef + + * 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 * gst/gstbin.c: (gst_bin_iterate_func), (gst_bin_iterate): diff --git a/tests/old/testsuite/debug/commandline.c b/tests/old/testsuite/debug/commandline.c index 9416740..fbfafe7 100644 --- a/tests/old/testsuite/debug/commandline.c +++ b/tests/old/testsuite/debug/commandline.c @@ -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); diff --git a/testsuite/debug/commandline.c b/testsuite/debug/commandline.c index 9416740..fbfafe7 100644 --- a/testsuite/debug/commandline.c +++ b/testsuite/debug/commandline.c @@ -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); -- 2.7.4