Commit 3b1f845a authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2377] Warn on unexpected EOF after error

When there's an error, we expect there'll be EOLN somewhere, so we can
recover. Warn in case there's EOF.
parent c1299514
......@@ -204,6 +204,9 @@ MasterLoader::MasterLoaderImpl::loadIncremental(size_t count_limit) {
const MasterToken& token(lexer_.getNextToken());
switch (token.getType()) {
case MasterToken::END_OF_FILE:
"Unexpected end ond of file");
// TODO: Try pop in case this is not the only
// source
return (true);
......@@ -282,9 +282,8 @@ TEST_F(MasterLoaderTest, brokenZone) {
EXPECT_EQ(1, errors_.size());
// FIXME: The invalid rdata generates a warning.
// And we may want to generate warning ourself here too.
// EXPECT_TRUE(warnings_.empty());
// The unexpected EOF warning
EXPECT_EQ(1, warnings_.size());
checkRR("", RRType::SOA(), " "
" 1234 3600 1800 2419200 7200");
Supports Markdown
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