|
@@ -185,10 +185,19 @@ TEST(Support, Path) {
|
|
|
path::native(*i, temp_store);
|
|
|
}
|
|
|
|
|
|
- SmallString<32> Relative("foo.cpp");
|
|
|
- sys::fs::make_absolute("/root", Relative);
|
|
|
- Relative[5] = '/'; // Fix up windows paths.
|
|
|
- ASSERT_EQ("/root/foo.cpp", Relative);
|
|
|
+ {
|
|
|
+ SmallString<32> Relative("foo.cpp");
|
|
|
+ sys::fs::make_absolute("/root", Relative);
|
|
|
+ Relative[5] = '/'; // Fix up windows paths.
|
|
|
+ ASSERT_EQ("/root/foo.cpp", Relative);
|
|
|
+ }
|
|
|
+
|
|
|
+ {
|
|
|
+ SmallString<32> Relative("foo.cpp");
|
|
|
+ sys::fs::make_absolute("//root", Relative);
|
|
|
+ Relative[6] = '/'; // Fix up windows paths.
|
|
|
+ ASSERT_EQ("//root/foo.cpp", Relative);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
TEST(Support, FilenameParent) {
|