namespace fs = util::filesystem;
-static inline std::string
-os_path(std::string path)
-{
-#if defined(_WIN32) && !defined(HAVE_DIRENT_H)
- std::replace(path.begin(), path.end(), '/', '\\');
-#endif
-
- return path;
-}
-
TEST_SUITE_BEGIN("storage::local::util");
TEST_CASE("storage::local::for_each_cache_subdir")
return f1.path() < f2.path();
});
- CHECK(files[0].path() == os_path("0/1/file_b"));
+ CHECK(files[0].path() == "0/1/file_b");
CHECK(files[0].size() == 1);
- CHECK(files[1].path() == os_path("0/1/file_c"));
+ CHECK(files[1].path() == "0/1/file_c");
CHECK(files[1].size() == 2);
- CHECK(files[2].path() == os_path("0/f/c/file_d"));
+ CHECK(files[2].path() == "0/f/c/file_d");
CHECK(files[2].size() == 3);
- CHECK(files[3].path() == os_path("0/file_a"));
+ CHECK(files[3].path() == "0/file_a");
CHECK(files[3].size() == 0);
}
}