Fixed test cases under MS Visual Studio

This commit is contained in:
Bartek Kryza
2023-01-16 23:39:30 +01:00
parent 7a1cbbce9a
commit c49053dcf2
6 changed files with 39 additions and 8 deletions

View File

@@ -191,4 +191,15 @@ TEST_CASE("Test path_to_url", "[unit-test]")
fs::path p4{"/"};
p4.make_preferred();
CHECK(path_to_url(p4) == "/");
#ifdef _MSC_VER
fs::path p5{"C:\\A\\B\\include.h"};
CHECK(path_to_url(p5) == "/c/A/B/include.h");
fs::path p6{"C:A\\B\\include.h"};
CHECK(path_to_url(p6) == "C:/A/B/include.h");
fs::path p7{"A\\B\\include.h"};
CHECK(path_to_url(p7) == "A/B/include.h");
#endif
}