tests: Fix running mapping test with -m argument

`g_test_init()` needs to be called before custom command line handling
so it has a chance to strip out the arguments it handles.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-01-18 16:50:58 +00:00
parent 615060d872
commit 82a6c54135

View File

@ -299,6 +299,7 @@ main (int argc,
}
#endif
g_test_init (&argc, &argv, NULL);
local_argv = argv;
if (argc > 1)
@ -307,8 +308,6 @@ main (int argc,
return EXIT_SUCCESS;
}
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/mapping/flags", test_mapping_flags);
g_test_add_func ("/mapping/private", test_private);
g_test_add_func ("/mapping/private-child", test_child_private);