bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2016-2018 Dovecot authors, see the included COPYING file */
b7324e421e2132cbbf753e6fdbe675bbaecdf929Timo Sirainen static const struct {
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomi const char *a;
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomi const char *b;
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomi test_assert_idx(dns_compare(tests[i].a, tests[i].b) == tests[i].res, i);
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomi test_assert_idx(dns_compare_labels(tests[i].a, tests[i].b) == tests[i].res, i);
b7324e421e2132cbbf753e6fdbe675bbaecdf929Timo Sirainen static const struct {
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomi { "real.name.test.invalid", "*.test.invalid", -1 },
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomi { "real.name.test.invalid", "*.*.test.invalid", 0 },
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomi { "name.test.invalid", "*name*.test.invalid", -1 },
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomi test_assert_idx(dns_match_wildcard(tests[i].name, tests[i].mask) == tests[i].res, i);
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomiarr_dns_compare(const char *const *a, const char *const *b)
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomi "test.invalid",
a7f58d28d4ccceaf03e2032ec8e855e1ba965bfeAki Tuomi "test.invalid",
00a15fe7ccadda399a86fe67ad2ed22488ff0c05Timo Sirainen test_assert_idx(dns_compare(*strp, output[i]) == 0, i);
baf3e87e186453fda13bd21f7cbcb2efc8492e8bTimo Sirainen void (*const test_functions[])(void) = {