[Xcb-commit] tests

Josh Triplett josh at kemper.freedesktop.org
Mon Nov 20 17:48:55 PST 2006


 tests/check_public.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+)

New commits:
diff-tree 6c3a8db3f69aebf2b5c1330ec6c11b3138f9bdfe (from 3d9bb02012b35fd51ed3352d0bd974a0f6e439d8)
Author: Josh Triplett <josh at freedesktop.org>
Date:   Mon Nov 20 17:48:49 2006 -0800

    Add new xcb_parse_display test cases, most related to IPv6 addresses

diff --git a/tests/check_public.c b/tests/check_public.c
index 295f118..a28fb49 100644
--- a/tests/check_public.c
+++ b/tests/check_public.c
@@ -119,10 +119,22 @@ END_TEST
 
 START_TEST(parse_display_ipv6)
 {
+	parse_display_pass(":::0", "::", 0, 0);
+	parse_display_pass("1:::0", "1::", 0, 0);
 	parse_display_pass("::1:0", "::1", 0, 0);
 	parse_display_pass("::1:0.1", "::1", 0, 1);
+	parse_display_pass("::127.0.0.1:0", "::127.0.0.1", 0, 0);
+	parse_display_pass("::ffff:127.0.0.1:0", "::ffff:127.0.0.1", 0, 0);
 	parse_display_pass("2002:83fc:d052::1:0", "2002:83fc:d052::1", 0, 0);
 	parse_display_pass("2002:83fc:d052::1:0.1", "2002:83fc:d052::1", 0, 1);
+	parse_display_pass("[::]:0", "[::]", 0, 0);
+	parse_display_pass("[1::]:0", "[1::]", 0, 0);
+	parse_display_pass("[::1]:0", "[::1]", 0, 0);
+	parse_display_pass("[::1]:0.1", "[::1]", 0, 1);
+	parse_display_pass("[::127.0.0.1]:0", "[::127.0.0.1]", 0, 0);
+	parse_display_pass("[::ffff:127.0.0.1]:0", "[::ffff:127.0.0.1]", 0, 0);
+	parse_display_pass("[2002:83fc:d052::1]:0", "[2002:83fc:d052::1]", 0, 0);
+	parse_display_pass("[2002:83fc:d052::1]:0.1", "[2002:83fc:d052::1]", 0, 1);
 }
 END_TEST
 
@@ -140,15 +152,28 @@ START_TEST(parse_display_negative)
 	parse_display_fail("");
 	parse_display_fail(":");
 	parse_display_fail("::");
+	parse_display_fail(":::");
 	parse_display_fail(":.");
 	parse_display_fail(":a");
 	parse_display_fail(":a.");
 	parse_display_fail(":0.");
+	parse_display_fail(":.a");
+	parse_display_fail(":.0");
 	parse_display_fail(":0.a");
 	parse_display_fail(":0.0.");
 
+	parse_display_fail("127.0.0.1");
+	parse_display_fail("127.0.0.1:");
+	parse_display_fail("127.0.0.1::");
+	parse_display_fail("::127.0.0.1");
+	parse_display_fail("::127.0.0.1:");
+	parse_display_fail("::127.0.0.1::");
+	parse_display_fail("::ffff:127.0.0.1");
+	parse_display_fail("::ffff:127.0.0.1:");
+	parse_display_fail("::ffff:127.0.0.1::");
 	parse_display_fail("localhost");
 	parse_display_fail("localhost:");
+	parse_display_fail("localhost::");
 }
 END_TEST
 


More information about the xcb-commit mailing list