--- a/gplugin/tests/test-option-group.c Mon Jan 24 20:35:04 2022 -0600
+++ b/gplugin/tests/test-option-group.c Mon Jan 24 20:35:04 2022 -0600
@@ -106,7 +106,7 @@
gchar *args = "test-option-group,-p,foo";
expected = test_gplugin_manager_default_paths();
- expected = g_list_prepend(expected, g_strdup_printf("foo%s", G_DIR_SEPARATOR_S));
+ expected = g_list_prepend(expected, g_strdup("foo" G_DIR_SEPARATOR_S)); test_gplugin_option_group_paths(args, expected);
@@ -118,9 +118,9 @@
gchar *args = "test-option-group,-p,foo,-p,bar,-p,baz";
expected = test_gplugin_manager_default_paths();
- expected = g_list_prepend(expected, g_strdup_printf("foo%s", G_DIR_SEPARATOR_S));
- expected = g_list_prepend(expected, g_strdup_printf("bar%s", G_DIR_SEPARATOR_S));
- expected = g_list_prepend(expected, g_strdup_printf("baz%s", G_DIR_SEPARATOR_S));
+ expected = g_list_prepend(expected, g_strdup("foo" G_DIR_SEPARATOR_S)); + expected = g_list_prepend(expected, g_strdup("bar" G_DIR_SEPARATOR_S)); + expected = g_list_prepend(expected, g_strdup("baz" G_DIR_SEPARATOR_S)); test_gplugin_option_group_paths(args, expected);
@@ -147,7 +147,7 @@
gchar *args = "test-option-group,-D,-p,foo";
- expected = g_list_prepend(expected, g_strdup_printf("foo%s", G_DIR_SEPARATOR_S));
+ expected = g_list_prepend(expected, g_strdup("foo" G_DIR_SEPARATOR_S)); test_gplugin_option_group_paths(args, expected);
@@ -158,9 +158,9 @@
gchar *args = "test-option-group,-D,-p,foo,-p,bar,-p,baz";
- expected = g_list_prepend(expected, g_strdup_printf("foo%s", G_DIR_SEPARATOR_S));
- expected = g_list_prepend(expected, g_strdup_printf("bar%s", G_DIR_SEPARATOR_S));
- expected = g_list_prepend(expected, g_strdup_printf("baz%s", G_DIR_SEPARATOR_S));
+ expected = g_list_prepend(expected, g_strdup("foo" G_DIR_SEPARATOR_S)); + expected = g_list_prepend(expected, g_strdup("bar" G_DIR_SEPARATOR_S)); + expected = g_list_prepend(expected, g_strdup("baz" G_DIR_SEPARATOR_S)); test_gplugin_option_group_paths(args, expected);
@@ -168,7 +168,7 @@
test_gplugin_option_group_add_path_short(void)
- GList *expected = g_list_prepend(NULL, g_strdup_printf("foo%s", G_DIR_SEPARATOR_S));
+ GList *expected = g_list_prepend(NULL, g_strdup("foo" G_DIR_SEPARATOR_S)); gchar *args = "test-option-group,-D,-p,foo";
test_gplugin_option_group_paths(args, expected);
@@ -177,7 +177,7 @@
test_gplugin_option_group_add_path_long(void)
- GList *expected = g_list_prepend(NULL, g_strdup_printf("foo%s", G_DIR_SEPARATOR_S));
+ GList *expected = g_list_prepend(NULL, g_strdup("foo" G_DIR_SEPARATOR_S)); gchar *args = "test-option-group,-D,--path,foo";
test_gplugin_option_group_paths(args, expected);
--- a/gplugin/tests/test-plugin-manager-paths.c Mon Jan 24 20:35:04 2022 -0600
+++ b/gplugin/tests/test-plugin-manager-paths.c Mon Jan 24 20:35:04 2022 -0600
@@ -239,20 +239,14 @@
path_count = g_list_length(paths);
/* build contents of environment vars */
- pre_paths = g_strdup_printf("%s%s%s%s%s%s",
+ pre_paths = g_strdup_printf("%s%s%s", + G_DIR_SEPARATOR_S "prefoo", G_SEARCHPATH_SEPARATOR_S,
- post_paths = g_strdup_printf("%s%s%s%s%s%s",
+ G_DIR_SEPARATOR_S "prebar" G_DIR_SEPARATOR_S); + post_paths = g_strdup_printf("%s%s%s", + G_DIR_SEPARATOR_S "postfoo", G_SEARCHPATH_SEPARATOR_S,
+ G_DIR_SEPARATOR_S "postbar" G_DIR_SEPARATOR_S); /* put /envfoo and /envbar as paths in an environment variable */
g_setenv(pre_env_var_name, pre_paths, TRUE);