diff --git a/support/test/src/utils/path_test.cpp b/support/test/src/utils/path_test.cpp index ab0ca9df..ff1b7a99 100644 --- a/support/test/src/utils/path_test.cpp +++ b/support/test/src/utils/path_test.cpp @@ -98,7 +98,6 @@ TEST(utils_path, get_slash) { TEST(utils_path, combine) { auto s = utils::path::combine(R"(\test\path)", {}); - #if defined(_WIN32) EXPECT_STREQ(R"(\test\path)", s.c_str()); #else @@ -118,6 +117,20 @@ TEST(utils_path, combine) { #else EXPECT_STREQ("/test/path/again", s.c_str()); #endif + +#if defined(_WIN32) + s = utils::path::combine(R"(R:\test)", {R"(\path)", R"(\again\)"}); + EXPECT_STREQ(R"(r:\test\path\again)", s.c_str()); + + s = utils::path::combine("R:", {R"(\path)", R"(\again\)"}); + EXPECT_STREQ(R"(r:\path\again)", s.c_str()); + + s = utils::path::combine("R:", {}); + EXPECT_STREQ("r:", s.c_str()); + + s = utils::path::combine("R:", {"\\"}); + EXPECT_STREQ("r:", s.c_str()); +#endif } TEST(utils_path, format_path) {