diff options
author | Evan Martin <martine@danga.com> | 2010-10-24 19:29:26 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2010-10-24 19:29:26 (GMT) |
commit | bf702219fb035aa1a79b7a2a94669a6eebe8291d (patch) | |
tree | dacbf2c55a6a06bdfe3f1298a57362f800ef2d2d /ninja_test.cc | |
parent | 8554cce38d126ed7bfa4ecb472d5a71ea1698823 (diff) | |
download | Ninja-bf702219fb035aa1a79b7a2a94669a6eebe8291d.zip Ninja-bf702219fb035aa1a79b7a2a94669a6eebe8291d.tar.gz Ninja-bf702219fb035aa1a79b7a2a94669a6eebe8291d.tar.bz2 |
support comments
Diffstat (limited to 'ninja_test.cc')
-rw-r--r-- | ninja_test.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ninja_test.cc b/ninja_test.cc index 8fa9296..32afaa0 100644 --- a/ninja_test.cc +++ b/ninja_test.cc @@ -66,6 +66,14 @@ TEST(Parser, Continuation) { EXPECT_EQ("foo bar baz", rule->command_.unparsed()); } +TEST(Parser, Comment) { + State state; + ASSERT_NO_FATAL_FAILURE(AssertParse(&state, +"# this is a comment\n" +"foo = not # a comment\n")); + EXPECT_EQ("not # a comment", state.env_["foo"]); +} + TEST(Parser, Errors) { State state; |