From: Mukund Sivaraman Date: Fri, 22 Feb 2013 07:34:46 +0000 (+0530) Subject: [2386] Check that origin argument is used for relative names X-Git-Tag: bind10-1.1.0beta1-release~73^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=219a7b2b14bdff5b2765fac9297dadf246ccac09;p=thirdparty%2Fkea.git [2386] Check that origin argument is used for relative names --- diff --git a/src/lib/dns/tests/rdata_nsec_unittest.cc b/src/lib/dns/tests/rdata_nsec_unittest.cc index 4092c6dbb9..ba06d743f1 100644 --- a/src/lib/dns/tests/rdata_nsec_unittest.cc +++ b/src/lib/dns/tests/rdata_nsec_unittest.cc @@ -72,6 +72,12 @@ TEST_F(Rdata_NSEC_Test, createFromLexer_NSEC) { *test::createRdataUsingLexer(RRType::NSEC(), RRClass::IN(), nsec_txt))); + // test::createRdataUsingLexer() constructs relative to + // "example.org." origin. + EXPECT_EQ(0, generic::NSEC("www2.example.org. CNAME RRSIG NSEC").compare( + *test::createRdataUsingLexer(RRType::NSEC(), RRClass::IN(), + "www2 CNAME RRSIG NSEC"))); + // Exceptions cause NULL to be returned. EXPECT_FALSE(test::createRdataUsingLexer(RRType::NSEC(), RRClass::IN(), "www.isc.org."));