added checks in test-registrable-domain.c

This commit is contained in:
Tim Ruehsen 2014-04-16 10:53:59 +02:00
parent 2c7c11d8a6
commit 5fa3b170bd
1 changed files with 9 additions and 0 deletions

View File

@ -108,6 +108,15 @@ static void test_psl(void)
// Norwegian with lowercase oe
test(psl, "www.\303\270yer.no", "www.\303\270yer.no");
// special check with NULL psl context and TLD
test(psl, "whoever.forgot.his.name", "whoever.forgot.his.name");
// special check with NULL psl context and TLD
test(psl, "forgot.his.name", NULL);
// special check with NULL psl context and TLD
test(psl, "his.name", "his.name");
if ((fp = fopen(PSL_TESTFILE, "r"))) {
while ((fgets(buf, sizeof(buf), fp))) {
if (sscanf(buf, " checkPublicSuffix('%127[^']' , '%127[^']", domain, expected_regdom) != 2) {