From b8f7a7994721aa0844fd53f2c73877c0500c5850 Mon Sep 17 00:00:00 2001 From: Tim Ruehsen Date: Tue, 15 Apr 2014 15:02:50 +0200 Subject: [PATCH] added checks for special .name domain --- tests/test-is-public-builtin.c | 9 +++++++++ tests/test-is-public.c | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/tests/test-is-public-builtin.c b/tests/test-is-public-builtin.c index 7f53b63..fdc2701 100644 --- a/tests/test-is-public-builtin.c +++ b/tests/test-is-public-builtin.c @@ -68,6 +68,15 @@ static void test_psl(void) { "www.\345\225\206\346\240\207", 0 }, { "xn--czr694b", 1 }, { "www.xn--czr694b", 0 }, + // some special test follow ('name' and 'forgot.his.name' are public, but e.g. his.name is not) + { "name", 1 }, + { ".name", 1 }, + { "his.name", 0 }, + { ".his.name", 0 }, + { "forgot.his.name", 1 }, + { ".forgot.his.name", 1 }, + { "whoever.his.name", 0 }, + { "whoever.forgot.his.name", 0 }, }; unsigned it; const psl_ctx_t *psl; diff --git a/tests/test-is-public.c b/tests/test-is-public.c index 24cb32e..bf11d7e 100644 --- a/tests/test-is-public.c +++ b/tests/test-is-public.c @@ -66,6 +66,15 @@ static void test_psl(void) { "www.xxx.ck", 0 }, { "\345\225\206\346\240\207", 1 }, // xn--czr694b oder 商标 { "www.\345\225\206\346\240\207", 0 }, + // some special test follow ('name' and 'forgot.his.name' are public, but e.g. his.name is not) + { "name", 1 }, + { ".name", 1 }, + { "his.name", 0 }, + { ".his.name", 0 }, + { "forgot.his.name", 1 }, + { ".forgot.his.name", 1 }, + { "whoever.his.name", 0 }, + { "whoever.forgot.his.name", 0 }, }; unsigned it; psl_ctx_t *psl;