Created
April 18, 2011 02:59
-
-
Save iwadon/924738 to your computer and use it in GitHub Desktop.
diff of src/graph_test.cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/graph_test.cc b/src/graph_test.cc | |
| index ba41440..56e8ab5 100644 | |
| --- a/src/graph_test.cc | |
| +++ b/src/graph_test.cc | |
| @@ -79,3 +79,21 @@ TEST_F(GraphTest, ExplicitImplicit) { | |
| // the output to be dirty). | |
| EXPECT_TRUE(GetNode("out.o")->dirty_); | |
| } | |
| + | |
| +TEST_F(GraphTest, PathWithCurrentDirectory) { | |
| + ASSERT_NO_FATAL_FAILURE(AssertParse(&state_, | |
| +"rule catdep\n" | |
| +" depfile = $out.d\n" | |
| +" command = cat $in > $out\n" | |
| +"build ./out.o: catdep ./foo.cc\n")); | |
| + fs_.Create("./foo.cc", 1, ""); | |
| + fs_.Create("./out.o.d", 1, "out.o: foo.cc\n"); | |
| + fs_.Create("./out.o", 1, ""); | |
| + | |
| + Edge* edge = GetNode("./out.o")->in_edge_; | |
| + string err; | |
| + EXPECT_TRUE(edge->RecomputeDirty(&state_, &fs_, &err)); | |
| + ASSERT_EQ("", err); | |
| + | |
| + EXPECT_FALSE(GetNode("./out.o")->dirty_); | |
| +} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment