implement Path::join()

This commit is contained in:
josh committed 2014-06-18 23:49:04 -04:00
1 parent 863fb2018b
commit eb12420155
2 files changed
+10 -2

No files matched your search

+6
View File
@@ -21,3 +21,9 @@ TEST(PathTest, convert_backslashes_to_forward_slashes)
Path p("C:\\foo\\bar.txt");
EXPECT_EQ("C:/foo/bar.txt", p.to_s());
}
TEST(PathTest, joins_two_paths_together)
{
EXPECT_EQ("C:/foo/../baz", Path("C:\\foo").join("../baz").to_s());
EXPECT_EQ("/xyz/f.txt", Path("/xyz/").join("f.txt").to_s());
}