summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/graph.h1
-rw-r--r--src/parsers_test.cc4
-rw-r--r--src/state_test.cc2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/graph.h b/src/graph.h
index fe102d2..b483c6d 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -105,6 +105,7 @@ struct Rule {
bool restat() const { return restat_; }
const EvalString& command() const { return command_; }
+ EvalString& command() { return command_; }
const EvalString& description() const { return description_; }
const EvalString& depfile() const { return depfile_; }
diff --git a/src/parsers_test.cc b/src/parsers_test.cc
index 628e76a..53b4e92 100644
--- a/src/parsers_test.cc
+++ b/src/parsers_test.cc
@@ -61,7 +61,7 @@ TEST_F(ParserTest, Rules) {
ASSERT_EQ(3u, state.rules_.size());
const Rule* rule = state.rules_.begin()->second;
EXPECT_EQ("cat", rule->name());
- EXPECT_EQ("cat $in > $out", rule->command_.unparsed());
+ EXPECT_EQ("cat $in > $out", rule->command().unparsed());
}
TEST_F(ParserTest, Variables) {
@@ -118,7 +118,7 @@ TEST_F(ParserTest, Continuation) {
ASSERT_EQ(2u, state.rules_.size());
const Rule* rule = state.rules_.begin()->second;
EXPECT_EQ("link", rule->name());
- EXPECT_EQ("foo bar baz", rule->command_.unparsed());
+ EXPECT_EQ("foo bar baz", rule->command().unparsed());
}
TEST_F(ParserTest, Backslash) {
diff --git a/src/state_test.cc b/src/state_test.cc
index 5d91532..b9e55cb 100644
--- a/src/state_test.cc
+++ b/src/state_test.cc
@@ -23,7 +23,7 @@ TEST(State, Basic) {
State state;
Rule* rule = new Rule("cat");
string err;
- EXPECT_TRUE(rule->command_.Parse("cat $in > $out", &err));
+ EXPECT_TRUE(rule->command().Parse("cat $in > $out", &err));
ASSERT_EQ("", err);
state.AddRule(rule);
Edge* edge = state.AddEdge(rule);