summaryrefslogtreecommitdiffstats
path: root/src/manifest_parser_test.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-01-06 21:50:29 (GMT)
committerEvan Martin <martine@danga.com>2012-08-24 18:28:54 (GMT)
commitc90bdaa9d999e0c9c0180a8982f99d086b9aa5f9 (patch)
tree98dbe6dde9e0759e9759c8d72e3166d491f27cca /src/manifest_parser_test.cc
parent50b122e5743a738ddf636fdccaa4b6712508ea7d (diff)
downloadNinja-c90bdaa9d999e0c9c0180a8982f99d086b9aa5f9.zip
Ninja-c90bdaa9d999e0c9c0180a8982f99d086b9aa5f9.tar.gz
Ninja-c90bdaa9d999e0c9c0180a8982f99d086b9aa5f9.tar.bz2
add test that checks attributes on rules
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 a48c99e..0be489e 100644
--- a/src/manifest_parser_test.cc
+++ b/src/manifest_parser_test.cc
@@ -64,6 +64,17 @@ TEST_F(ParserTest, Rules) {
EXPECT_EQ("[cat ][$in][ > ][$out]", rule->command().Serialize());
}
+TEST_F(ParserTest, RuleAttributes) {
+ // Check that all of the allowed rule attributes are parsed ok.
+ ASSERT_NO_FATAL_FAILURE(AssertParse(
+"rule cat\n"
+" command = a\n"
+" depfile = a\n"
+" description = a\n"
+" generator = a\n"
+" restat = a\n"));
+}
+
TEST_F(ParserTest, IgnoreIndentedComments) {
ASSERT_NO_FATAL_FAILURE(AssertParse(
" #indented comment\n"