Go to the documentation of this file.
23 static void test(
const char *pattern,
const char *host)
26 printf(
"The pattern \"%s\" %s the hostname %s\n",
27 pattern ? pattern :
"(null)", res ?
"matches" :
"does not match",
33 test(NULL,
"domain.com");
34 test(
"example.com domain.com",
"domain.com");
35 test(
"example.com other.com",
"domain.com");
36 test(
"example.com,domain.com",
"domain.com");
37 test(
"example.com,domain.com",
"otherdomain.com");
38 test(
"example.com, *.domain.com",
"sub.domain.com");
39 test(
"example.com, *.domain.com",
"domain.com");
40 test(
"example.com, .domain.com",
"domain.com");
41 test(
"*",
"domain.com");