[glib] Fix gio/tests/inet-address on OS X



commit 79b7efada3582ad48f00aabade402f7eacdbe224
Author: Dan Winship <danw gnome org>
Date:   Mon Jul 11 17:38:30 2016 -0400

    Fix gio/tests/inet-address on OS X
    
    OS X apparently stringifies the IPv6 address "::80" as "::0.0.0.128",
    which is bizarre, but that address *is* in a "reserved for future use"
    range, so it's not unambiguously wrong I guess. Anyway, fix the text
    to use an address everyone can agree on.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768551

 gio/tests/inet-address.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gio/tests/inet-address.c b/gio/tests/inet-address.c
index 6e4c424..cae2004 100644
--- a/gio/tests/inet-address.c
+++ b/gio/tests/inet-address.c
@@ -252,19 +252,19 @@ test_socket_address_to_string (void)
   g_object_unref (ia);
 
   /* IPv6. */
-  ia = g_inet_address_new_from_string ("::80");
+  ia = g_inet_address_new_from_string ("fe80::80");
   sa = g_inet_socket_address_new (ia, 80);
   str = g_socket_connectable_to_string (G_SOCKET_CONNECTABLE (sa));
-  g_assert_cmpstr (str, ==, "[::80]:80");
+  g_assert_cmpstr (str, ==, "[fe80::80]:80");
   g_free (str);
   g_object_unref (sa);
   g_object_unref (ia);
 
   /* IPv6 without port. */
-  ia = g_inet_address_new_from_string ("::80");
+  ia = g_inet_address_new_from_string ("fe80::80");
   sa = g_inet_socket_address_new (ia, 0);
   str = g_socket_connectable_to_string (G_SOCKET_CONNECTABLE (sa));
-  g_assert_cmpstr (str, ==, "::80");
+  g_assert_cmpstr (str, ==, "fe80::80");
   g_free (str);
   g_object_unref (sa);
   g_object_unref (ia);


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