Path: Add CreateFileURL()

This commit is contained in:
Stenzek
2024-03-13 19:39:10 +10:00
parent b9c9b05878
commit 9211d9f2e3
6 changed files with 132 additions and 77 deletions

View File

@ -255,4 +255,14 @@ TEST(Path, RealPath)
#endif
}
#endif
#endif
TEST(Path, CreateFileURL)
{
#ifdef _WIN32
ASSERT_EQ(Path::CreateFileURL("C:\\foo\\bar"), "file:///C:/foo/bar");
ASSERT_EQ(Path::CreateFileURL("\\\\server\\share\\file.txt"), "file://server/share/file.txt");
#else
ASSERT_EQ(Path::CreateFileURL("/foo/bar"), "file:///foo/bar");
#endif
}