Commit e76b79a1 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2428] Check the special handling of $

parent 3b1f845a
...@@ -223,6 +223,9 @@ struct ErrorCase { ...@@ -223,6 +223,9 @@ struct ErrorCase {
{ "www 3600 IN \"A\" 192.0.2.1", "Quoted type" }, { "www 3600 IN \"A\" 192.0.2.1", "Quoted type" },
{ "unbalanced)paren 3600 IN A 192.0.2.1", "Token error 1" }, { "unbalanced)paren 3600 IN A 192.0.2.1", "Token error 1" },
{ "www 3600 unbalanced)paren A 192.0.2.1", "Token error 2" }, { "www 3600 unbalanced)paren A 192.0.2.1", "Token error 2" },
// Check the unknown directive. The rest looks like ordinary RR,
// so we see the $ is actually special.
{ "$UNKNOWN 3600 IN A 192.0.2.1", "Unknown $ directive" },
{ NULL, NULL } { NULL, NULL }
}; };
...@@ -242,7 +245,7 @@ TEST_F(MasterLoaderTest, brokenZone) { ...@@ -242,7 +245,7 @@ TEST_F(MasterLoaderTest, brokenZone) {
EXPECT_FALSE(loader_->loadedSucessfully()); EXPECT_FALSE(loader_->loadedSucessfully());
EXPECT_THROW(loader_->load(), MasterLoaderError); EXPECT_THROW(loader_->load(), MasterLoaderError);
EXPECT_FALSE(loader_->loadedSucessfully()); EXPECT_FALSE(loader_->loadedSucessfully());
EXPECT_EQ(1, errors_.size()) << errors_[0]; EXPECT_EQ(1, errors_.size());
EXPECT_TRUE(warnings_.empty()); EXPECT_TRUE(warnings_.empty());
checkRR("example.org", RRType::SOA(), "ns1.example.org. " checkRR("example.org", RRType::SOA(), "ns1.example.org. "
......
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