ComputePathTo: Handle case where from == to.
This commit is contained in:
parent
d8136adbed
commit
0e3cf9862e
3 changed files with 15 additions and 3 deletions
|
@ -661,6 +661,9 @@ static bool TestPath() {
|
|||
EXPECT_TRUE(Path("/").ComputePathTo(Path("/home/foo/bar"), computedPath));
|
||||
EXPECT_EQ_STR(computedPath, std::string("home/foo/bar"));
|
||||
|
||||
EXPECT_TRUE(Path("/a/b").ComputePathTo(Path("/a/b"), computedPath));
|
||||
EXPECT_EQ_STR(computedPath, std::string());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue