summaryrefslogtreecommitdiffstats
path: root/src/manifest_parser_test.cc
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2013-07-18 21:39:41 (GMT)
committerNico Weber <thakis@chromium.org>2013-07-18 21:39:41 (GMT)
commit6bf7c4cb6bcbc1c90fcc3b8ea365838e8417beee (patch)
treee69172038d6702acb2103ad734d78eb2034501f4 /src/manifest_parser_test.cc
parent1f357a79984d9cae226ea73269ccabb500be2a31 (diff)
downloadNinja-6bf7c4cb6bcbc1c90fcc3b8ea365838e8417beee.zip
Ninja-6bf7c4cb6bcbc1c90fcc3b8ea365838e8417beee.tar.gz
Ninja-6bf7c4cb6bcbc1c90fcc3b8ea365838e8417beee.tar.bz2
Add test for a manifest ending in the middle of a keyword.
Diffstat (limited to 'src/manifest_parser_test.cc')
-rw-r--r--src/manifest_parser_test.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/manifest_parser_test.cc b/src/manifest_parser_test.cc
index b333549..be63e52 100644
--- a/src/manifest_parser_test.cc
+++ b/src/manifest_parser_test.cc
@@ -302,6 +302,17 @@ TEST_F(ParserTest, Errors) {
State state;
ManifestParser parser(&state, NULL);
string err;
+ EXPECT_FALSE(parser.ParseTest(string("subn", 4), &err));
+ EXPECT_EQ("input:1: expected '=', got eof\n"
+ "subn\n"
+ " ^ near here"
+ , err);
+ }
+
+ {
+ State state;
+ ManifestParser parser(&state, NULL);
+ string err;
EXPECT_FALSE(parser.ParseTest("foobar", &err));
EXPECT_EQ("input:1: expected '=', got eof\n"
"foobar\n"