diff options
author | Evan Martin <martine@danga.com> | 2010-12-20 00:19:34 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2010-12-21 00:01:53 (GMT) |
commit | f2a4bac9127124563cd783a798e64dd15204d598 (patch) | |
tree | 83d8283883197d41146a19beded31f5fb179ab2b /src/parsers_test.cc | |
parent | 1297efdd10db66a6174f4fa2e71dd4169b278abd (diff) | |
download | Ninja-f2a4bac9127124563cd783a798e64dd15204d598.zip Ninja-f2a4bac9127124563cd783a798e64dd15204d598.tar.gz Ninja-f2a4bac9127124563cd783a798e64dd15204d598.tar.bz2 |
immediately evaluate variables in top-level bindings
Diffstat (limited to 'src/parsers_test.cc')
-rw-r--r-- | src/parsers_test.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/parsers_test.cc b/src/parsers_test.cc index 8187a62..58e40b8 100644 --- a/src/parsers_test.cc +++ b/src/parsers_test.cc @@ -57,12 +57,15 @@ TEST_F(ParserTest, Variables) { "\n" "extra = -pthread\n" "with_under = -under\n" -"build a: link b c\n")); +"build a: link b c\n" +"nested1 = 1\n" +"nested2 = $nested1/2\n")); ASSERT_EQ(1, state.edges_.size()); Edge* edge = state.edges_[0]; EXPECT_EQ("ld one-letter-test -pthread -under -o a b c", edge->EvaluateCommand()); + EXPECT_EQ("1/2", state.bindings_.LookupVariable("nested2")); } TEST_F(ParserTest, VariableScope) { |