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",
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");
static void test(const char *pattern, const char *host)
printf("static const uint8_t my_array[100] = {\n")