summaryrefslogtreecommitdiffstats
path: root/src/manifest_parser_test.cc
diff options
context:
space:
mode:
authorNicolas Despres <nicolas.despres@gmail.com>2016-05-24 10:12:28 (GMT)
committerNicolas Despres <nicolas.despres@gmail.com>2016-05-25 07:11:38 (GMT)
commitccaa3d1c9c8a581ce0cd696a3b0d6ab713908e40 (patch)
tree542cd73d33789eb7b979d3b23223baf8dc603fea /src/manifest_parser_test.cc
parent63a8584b069a32b871237fc80dcb4c397b863ef7 (diff)
downloadNinja-ccaa3d1c9c8a581ce0cd696a3b0d6ab713908e40.zip
Ninja-ccaa3d1c9c8a581ce0cd696a3b0d6ab713908e40.tar.gz
Ninja-ccaa3d1c9c8a581ce0cd696a3b0d6ab713908e40.tar.bz2
Parser accepts no explicit outputs.
There is a class of commands that take an output directory where they create their output files. Among them are cp(1), tar(1) to name a few. These commands have one or more implicit outputs but no explicit output. With this patch, Ninja's parser accepts build edge with an empty list of explicit outputs.
Diffstat (limited to 'src/manifest_parser_test.cc')
-rw-r--r--src/manifest_parser_test.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/manifest_parser_test.cc b/src/manifest_parser_test.cc
index 1312d26..3c82dc5 100644
--- a/src/manifest_parser_test.cc
+++ b/src/manifest_parser_test.cc
@@ -976,13 +976,10 @@ TEST_F(ParserTest, ImplicitOutputDupes) {
TEST_F(ParserTest, NoExplicitOutput) {
ManifestParser parser(&state, NULL, kDupeEdgeActionWarn);
string err;
- EXPECT_FALSE(parser.ParseTest(
+ EXPECT_TRUE(parser.ParseTest(
"rule cat\n"
" command = cat $in > $out\n"
"build | imp : cat bar\n", &err));
- ASSERT_EQ("input:3: expected path\n"
- "build | imp : cat bar\n"
- " ^ near here", err);
}
TEST_F(ParserTest, DefaultDefault) {