]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[413] Add a unittest for numeric owner names in master files
authorMukund Sivaraman <muks@isc.org>
Thu, 6 Feb 2014 11:15:28 +0000 (16:45 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 6 Feb 2014 11:15:42 +0000 (16:45 +0530)
src/lib/dns/tests/master_loader_unittest.cc

index ce9b8f78443604575ce5fc1d85c5ba830d957e02..d5200055d3f482256a8c4837a27090b262b1490c 100644 (file)
@@ -952,4 +952,19 @@ TEST_F(MasterLoaderTest, previousInInclude) {
     checkARR("www.example.org");
 }
 
+TEST_F(MasterLoaderTest, numericOwnerName) {
+    const string input("$ORIGIN example.org.\n"
+                       "1 3600 IN A 192.0.2.1\n");
+    stringstream ss(input);
+    setLoader(ss, Name("example.org."), RRClass::IN(),
+              MasterLoader::MANY_ERRORS);
+
+    loader_->load();
+    EXPECT_TRUE(loader_->loadedSucessfully());
+    EXPECT_TRUE(errors_.empty());
+    EXPECT_TRUE(warnings_.empty());
+
+    checkRR("1.example.org", RRType::A(), "192.0.2.1");
+}
+
 }