[glib] tests: add a few more invalid IPv6 address tests
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] tests: add a few more invalid IPv6 address tests
- Date: Wed, 5 Jun 2013 22:49:26 +0000 (UTC)
commit 74a034028a964a25cc11318caf0b3c6d9a47bbcc
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Jun 5 15:51:13 2013 -0400
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 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/inet-address.c b/gio/tests/inet-address.c
index 8052aec..9e75eb0 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]