summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-11-15 16:57:14 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-10-09 09:32:27 +0800
commitfd57c27fece4b9d4279d03948adb5a8d10e3b872 (patch)
treee61812e31f0b09499f2ca7e4d3e547afd70120ba
parenta3bd59bf7b2441c4575b0d82c671684df89d5243 (diff)
downloadlibpeas-fd57c27fece4b9d4279d03948adb5a8d10e3b872.tar.gz
tests: Construct paths appropriately
Use G_DIR_SEPARATOR_S so that we don't confuse between forward and backward slashes, so that tests won't fail unecessarily.
-rw-r--r--tests/libpeas/plugin-info.c4
-rw-r--r--tests/libpeas/testing/testing.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/libpeas/plugin-info.c b/tests/libpeas/plugin-info.c
index 693a0cd..d862876 100644
--- a/tests/libpeas/plugin-info.c
+++ b/tests/libpeas/plugin-info.c
@@ -73,7 +73,7 @@ test_plugin_info_verify_full_info (PeasEngine *engine)
g_assert_cmpstr (peas_plugin_info_get_module_name (info), ==, "full-info");
g_assert (g_str_has_suffix (peas_plugin_info_get_module_dir (info), "/tests/plugins"));
- g_assert (g_str_has_suffix (peas_plugin_info_get_data_dir (info), "/tests/plugins/full-info"));
+ g_assert (g_str_has_suffix (peas_plugin_info_get_data_dir (info), "/tests/plugins" G_DIR_SEPARATOR_S "full-info"));
g_assert_cmpstr (peas_plugin_info_get_dependencies (info)[0], ==, "something");
g_assert_cmpstr (peas_plugin_info_get_dependencies (info)[1], ==, "something-else");
@@ -111,7 +111,7 @@ test_plugin_info_verify_min_info (PeasEngine *engine)
g_assert_cmpstr (peas_plugin_info_get_module_name (info), ==, "min-info");
g_assert (g_str_has_suffix (peas_plugin_info_get_module_dir (info), "/tests/plugins"));
- g_assert (g_str_has_suffix (peas_plugin_info_get_data_dir (info), "/tests/plugins/min-info"));
+ g_assert (g_str_has_suffix (peas_plugin_info_get_data_dir (info), "/tests/plugins" G_DIR_SEPARATOR_S "min-info"));
g_assert_cmpstr (peas_plugin_info_get_dependencies (info)[0], ==, NULL);
diff --git a/tests/libpeas/testing/testing.c b/tests/libpeas/testing/testing.c
index 1d06dcd..49b94f3 100644
--- a/tests/libpeas/testing/testing.c
+++ b/tests/libpeas/testing/testing.c
@@ -77,10 +77,10 @@ testing_engine_new_full (gboolean nonglobal_loaders)
testing_util_push_log_hook ("*Error loading *unkown-loader.plugin*");
testing_util_push_log_hook ("Bad plugin file '"
- BUILDDIR "*/embedded*.plugin': "
+ BUILDDIR "*" G_DIR_SEPARATOR_S "embedded*.plugin': "
"embedded plugins must be a resource");
testing_util_push_log_hook ("Error loading '"
- BUILDDIR "*/embedded*.plugin'*");
+ BUILDDIR "*" G_DIR_SEPARATOR_S "embedded*.plugin'*");
testing_util_push_log_hook ("Bad plugin file '"
BUILDDIR "*embedded-invalid-loader.plugin': "