skip trailing whitespace

This commit is contained in:
Evan Martin 2010-10-15 18:12:03 -07:00
parent ccd0d265ec
commit 0fb7308df5
2 changed files with 3 additions and 1 deletions

View File

@ -327,6 +327,8 @@ bool ManifestParser::Parse(const string& input, string* err) {
}
}
SkipWhitespace(true);
if (cur_ < end_)
return Error("expected eof", err);

View File

@ -71,7 +71,7 @@ TEST(Parser, Rule) {
string err;
EXPECT_TRUE(parser.Parse(
"rule cat\n"
"command cat @in > $out\n",
"command cat @in > $out\n\n",
&err));
EXPECT_EQ("", err);