diff options
Diffstat (limited to 'src/manifest_parser_test.cc')
-rw-r--r-- | src/manifest_parser_test.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/manifest_parser_test.cc b/src/manifest_parser_test.cc index be63e52..5ed1584 100644 --- a/src/manifest_parser_test.cc +++ b/src/manifest_parser_test.cc @@ -773,6 +773,17 @@ TEST_F(ParserTest, Include) { EXPECT_EQ("inner", state.bindings_.LookupVariable("var")); } +TEST_F(ParserTest, BrokenInclude) { + files_["include.ninja"] = "build\n"; + ManifestParser parser(&state, this); + string err; + EXPECT_FALSE(parser.ParseTest("include include.ninja\n", &err)); + EXPECT_EQ("include.ninja:1: expected path\n" + "build\n" + " ^ near here" + , err); +} + TEST_F(ParserTest, Implicit) { ASSERT_NO_FATAL_FAILURE(AssertParse( "rule cat\n" |