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
This commit is contained in:
Dan Winship 2016-07-11 17:38:30 -04:00
parent a9172c6d03
commit 79b7efada3

View File

@ -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);