run-test: Switch to new argv API
It's a bit nicer to use than manually defining the legacy ARGV array. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
This commit is contained in:
parent
699c7c1b2c
commit
f42c2d7371
@ -71,13 +71,7 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* prepare command line arguments */
|
/* prepare command line arguments */
|
||||||
if (!gjs_context_define_string_array (js_context, "ARGV",
|
gjs_context_set_argv (js_context, argc - 2, (const char**)argv + 2);
|
||||||
argc - 2, (const char**)argv + 2,
|
|
||||||
&error))
|
|
||||||
{
|
|
||||||
g_printerr ("Failed to defined ARGV: %s\n", error->message);
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
filename = argv[1];
|
filename = argv[1];
|
||||||
title = g_filename_display_basename (filename);
|
title = g_filename_display_basename (filename);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user