tests: Load unit tests as modules

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2822>
This commit is contained in:
Evan Welsh
2023-07-09 22:19:40 -07:00
parent 3f667be2e8
commit 26fa1046a3
7 changed files with 8 additions and 11 deletions

View File

@ -45,7 +45,7 @@ main(int argc, char **argv)
GjsContext *js_context;
const char *filename;
char *title;
int code;
uint8_t code;
context = g_option_context_new (NULL);
@ -82,7 +82,7 @@ main(int argc, char **argv)
error = NULL;
/* evaluate the script */
bool success = gjs_context_eval_file(js_context, filename, &code, &error);
bool success = gjs_context_eval_module_file(js_context, filename, &code, &error);
if (!success) {
g_printerr ("%s\n", error->message);
exit (1);