diff options
author | Josh Triplett <josh@freedesktop.org> | 2006-11-20 17:48:49 -0800 |
---|---|---|
committer | Josh Triplett <josh@freedesktop.org> | 2006-11-20 17:48:49 -0800 |
commit | 6c3a8db3f69aebf2b5c1330ec6c11b3138f9bdfe (patch) | |
tree | a75ebd5eddc00ff0fcdd38095be0a0e32c6f85c2 /tests | |
parent | 3d9bb02012b35fd51ed3352d0bd974a0f6e439d8 (diff) |
Add new xcb_parse_display test cases, most related to IPv6 addresses
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check_public.c | 25 |
1 files changed, 25 insertions, 0 deletions
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 |