summaryrefslogtreecommitdiff
path: root/tests/rendernode.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rendernode.c')
-rw-r--r--tests/rendernode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/rendernode.c b/tests/rendernode.c
index 42781a11f5..8efdebc02b 100644
--- a/tests/rendernode.c
+++ b/tests/rendernode.c
@@ -24,14 +24,18 @@ main(int argc, char **argv)
char *contents;
gsize len;
int run;
+ GOptionContext *context;
- if (!gtk_init_with_args (&argc, &argv, "NODE-FILE PNG-FILE",
- options, NULL, &error))
+ context = g_option_context_new ("NODE-FILE PNG-FILE");
+ g_option_context_add_main_entries (context, options, NULL);
+ if (!g_option_context_parse (context, &argc, &argv, &error))
{
g_printerr ("Option parsing failed: %s\n", error->message);
return 1;
}
+ gtk_init ();
+
if (runs < 1)
{
g_printerr ("Number of runs given with -r/--runs must be at least 1 and not %d.\n", runs);