This commit is contained in:
@ -255,7 +255,14 @@ TEST(utils_path, absolute) {
|
||||
path = utils::path::absolute("./");
|
||||
EXPECT_STREQ(dir.c_str(), path.c_str());
|
||||
|
||||
auto home = utils::path::absolute(utils::get_environment_variable("HOME"));
|
||||
#if defined(_WIN32)
|
||||
auto home_env = utils::get_environment_variable("USERPROFILE");
|
||||
#else // !defined(_WIN32)
|
||||
auto home_env = utils::get_environment_variable("HOME");
|
||||
#endif // defined(_WIN32)
|
||||
|
||||
auto home = utils::path::absolute(home_env);
|
||||
|
||||
path = utils::path::absolute("~");
|
||||
EXPECT_STREQ(home.c_str(), path.c_str());
|
||||
|
||||
|
Reference in New Issue
Block a user