summaryrefslogtreecommitdiff
path: root/src/manifest_parser_test.cc
diff options
context:
space:
mode:
authorBruce Dawson <randomascii@users.noreply.github.com>2022-02-16 16:06:15 -0800
committerGitHub <noreply@github.com>2022-02-16 16:06:15 -0800
commit34d03bd3db07f7cae57016eee0b60b4ebe5baecc (patch)
tree12e7703f8c2562ca25686a93e887f44e38c62c7d /src/manifest_parser_test.cc
parent87b8965080693f084e5784efde234b127711d8c1 (diff)
parentf404f0059d71c8c86da7b56c48794266b5befd10 (diff)
downloadninja-34d03bd3db07f7cae57016eee0b60b4ebe5baecc.tar.gz
Merge branch 'ninja-build:master' into compiler_detect
Diffstat (limited to 'src/manifest_parser_test.cc')
-rw-r--r--src/manifest_parser_test.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/manifest_parser_test.cc b/src/manifest_parser_test.cc
index 5b0eddf..66b72e2 100644
--- a/src/manifest_parser_test.cc
+++ b/src/manifest_parser_test.cc
@@ -965,6 +965,16 @@ TEST_F(ParserTest, OrderOnly) {
ASSERT_TRUE(edge->is_order_only(1));
}
+TEST_F(ParserTest, Validations) {
+ ASSERT_NO_FATAL_FAILURE(AssertParse(
+"rule cat\n command = cat $in > $out\n"
+"build foo: cat bar |@ baz\n"));
+
+ Edge* edge = state.LookupNode("foo")->in_edge();
+ ASSERT_EQ(edge->validations_.size(), 1);
+ EXPECT_EQ(edge->validations_[0]->path(), "baz");
+}
+
TEST_F(ParserTest, ImplicitOutput) {
ASSERT_NO_FATAL_FAILURE(AssertParse(
"rule cat\n"