Commit b0d9198e authored by Mukund Sivaraman's avatar Mukund Sivaraman Committed by Mark Andrews

Add NSEC3 fromtext/totext unittests

parent d4ea1edd
......@@ -1093,6 +1093,35 @@ ATF_TC_BODY(nsec, tc) {
dns_rdatatype_nsec, sizeof(dns_rdata_nsec_t));
}
/*
* NSEC3 tests.
*
* RFC 5155.
*/
ATF_TC(nsec3);
ATF_TC_HEAD(nsec3, tc) {
atf_tc_set_md_var(tc, "descr", "NSEC3 RDATA manipulations");
}
ATF_TC_BODY(nsec3, tc) {
text_ok_t text_ok[] = {
TEXT_INVALID(""),
TEXT_INVALID("."),
TEXT_INVALID(". RRSIG"),
TEXT_INVALID("1 0 10 76931F"),
TEXT_INVALID("1 0 10 76931F IMQ912BREQP1POLAH3RMONG;UED541AS"),
TEXT_INVALID("1 0 10 76931F IMQ912BREQP1POLAH3RMONG;UED541AS A RRSIG"),
TEXT_VALID("1 0 10 76931F AJHVGTICN6K0VDA53GCHFMT219SRRQLM A RRSIG"),
TEXT_VALID("1 0 10 76931F AJHVGTICN6K0VDA53GCHFMT219SRRQLM"),
TEXT_VALID("1 0 10 - AJHVGTICN6K0VDA53GCHFMT219SRRQLM"),
TEXT_SENTINEL()
};
UNUSED(tc);
check_rdata(text_ok, NULL, ISC_FALSE, dns_rdataclass_in,
dns_rdatatype_nsec3, sizeof(dns_rdata_nsec3_t));
}
/*
* WKS tests.
*
......@@ -1191,6 +1220,7 @@ ATF_TP_ADD_TCS(tp) {
ATF_TP_ADD_TC(tp, hip);
ATF_TP_ADD_TC(tp, isdn);
ATF_TP_ADD_TC(tp, nsec);
ATF_TP_ADD_TC(tp, nsec3);
ATF_TP_ADD_TC(tp, wks);
return (atf_no_error());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment