From 74a034028a964a25cc11318caf0b3c6d9a47bbcc Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Wed, 5 Jun 2013 15:51:13 -0400 Subject: [PATCH] tests: add a few more invalid IPv6 address tests https://bugzilla.gnome.org/show_bug.cgi?id=701401 --- gio/tests/inet-address.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gio/tests/inet-address.c b/gio/tests/inet-address.c index 8052aecb9..9e75eb0c3 100644 --- a/gio/tests/inet-address.c +++ b/gio/tests/inet-address.c @@ -54,10 +54,20 @@ test_parse (void) addr = g_inet_address_new_from_string ("::1::2"); g_assert (addr == NULL); + addr = g_inet_address_new_from_string ("2001:1:2:3:4:5:6:7]"); + g_assert (addr == NULL); + addr = g_inet_address_new_from_string ("[2001:1:2:3:4:5:6:7"); + g_assert (addr == NULL); + addr = g_inet_address_new_from_string ("[2001:1:2:3:4:5:6:7]"); + g_assert (addr == NULL); + addr = g_inet_address_new_from_string ("[2001:1:2:3:4:5:6:7]:80"); + g_assert (addr == NULL); addr = g_inet_address_new_from_string ("0:1:2:3:4:5:6:7:8:9"); g_assert (addr == NULL); addr = g_inet_address_new_from_string ("::FFFFFFF"); g_assert (addr == NULL); + addr = g_inet_address_new_from_string ("204.152.189.116:80"); + g_assert (addr != NULL); } static void