[libpeas/meson.msvc: 4/12] tests: Construct paths appropriately



commit d8cb313000b6f7c18b1bd6d1c055d598b1bc2ff4
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Nov 15 16:57:14 2019 +0800

    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.

 tests/libpeas/plugin-info.c     | 4 ++--
 tests/libpeas/testing/testing.c | 4 ++--
 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': "


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]