Commit 1b7273a3 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2428] Test popping the source

parent c9bd919b
...@@ -158,20 +158,21 @@ TEST_F(MasterLoaderTest, include) { ...@@ -158,20 +158,21 @@ TEST_F(MasterLoaderTest, include) {
}; };
for (const char** include = includes; *include != NULL; ++include) { for (const char** include = includes; *include != NULL; ++include) {
SCOPED_TRACE(*include); SCOPED_TRACE(*include);
// Prepare input source that has no other content than just the // Prepare input source that has the include and some more data
// include of the real master file. // below (to see it returns back to the original source).
const string include_str = "$" + string(*include) + " " + const string include_str = "$" + string(*include) + " " +
TEST_DATA_SRCDIR + "/example.org\n"; TEST_DATA_SRCDIR + "/example.org\nwww 3600 IN AAAA 2001:db8::1\n";
stringstream ss(include_str); stringstream ss(include_str);
setLoader(ss, Name("example.org."), RRClass::IN(), setLoader(ss, Name("example.org."), RRClass::IN(),
MasterLoader::MANY_ERRORS); MasterLoader::MANY_ERRORS);
loader_->load(); loader_->load();
EXPECT_TRUE(loader_->loadedSucessfully()); EXPECT_TRUE(loader_->loadedSucessfully());
EXPECT_TRUE(errors_.empty()) << errors_[0]; EXPECT_TRUE(errors_.empty());
EXPECT_TRUE(warnings_.empty()); EXPECT_TRUE(warnings_.empty());
checkBasicRRs(); checkBasicRRs();
checkRR("www.example.org", RRType::AAAA(), "2001:db8::1");
} }
} }
......
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