[glib] gio/tests/g-icon.c: fix some path checks on win32



commit bd883f8dc75f056c2b25e941fb09422dc5786bbe
Author: Dan Winship <danw gnome org>
Date:   Fri Feb 3 13:03:38 2012 -0500

    gio/tests/g-icon.c: fix some path checks on win32
    
    Some of the tests needed to be modified to use G_DIR_SEPARATOR_S
    rather than hardcoded "/"s.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669331

 gio/tests/g-icon.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gio/tests/g-icon.c b/gio/tests/g-icon.c
index 0058278..e38ee34 100644
--- a/gio/tests/g-icon.c
+++ b/gio/tests/g-icon.c
@@ -58,7 +58,7 @@ test_g_icon_serialize (void)
   g_object_unref (file);
 
   data = g_icon_to_string (icon);
-  g_assert_cmpstr (data, ==, "/some/native/path/to/an/icon.png");
+  g_assert_cmpstr (data, ==, G_DIR_SEPARATOR_S "some" G_DIR_SEPARATOR_S "native" G_DIR_SEPARATOR_S "path" G_DIR_SEPARATOR_S "to" G_DIR_SEPARATOR_S "an" G_DIR_SEPARATOR_S "icon.png");
   icon2 = g_icon_new_for_string (data, &error);
   g_assert_no_error (error);
   g_assert (g_icon_equal (icon, icon2));
@@ -71,7 +71,7 @@ test_g_icon_serialize (void)
   location = g_file_new_for_uri (uri);
   icon = g_file_icon_new (location);
   data = g_icon_to_string (icon);
-  g_assert_cmpstr (data, ==, "/some/native/path/to/an/icon with spaces.png");
+  g_assert_cmpstr (data, ==, G_DIR_SEPARATOR_S "some" G_DIR_SEPARATOR_S "native" G_DIR_SEPARATOR_S "path" G_DIR_SEPARATOR_S "to" G_DIR_SEPARATOR_S "an" G_DIR_SEPARATOR_S "icon with spaces.png");
   icon2 = g_icon_new_for_string (data, &error);
   g_assert_no_error (error);
   g_assert (g_icon_equal (icon, icon2));
@@ -138,7 +138,7 @@ test_g_icon_serialize (void)
   icon = g_icon_new_for_string ("/path/to/somewhere with whitespace.png", &error);
   g_assert_no_error (error);
   data = g_icon_to_string (icon);
-  g_assert_cmpstr (data, ==, "/path/to/somewhere with whitespace.png");
+  g_assert_cmpstr (data, ==, G_DIR_SEPARATOR_S "path" G_DIR_SEPARATOR_S "to" G_DIR_SEPARATOR_S "somewhere with whitespace.png");
   g_free (data);
   location = g_file_new_for_commandline_arg ("/path/to/somewhere with whitespace.png");
   icon2 = g_file_icon_new (location);



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