Skip to content

Commit

Permalink
Fix windows/linux path inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dudoslav committed Feb 29, 2024
1 parent 31f3cfe commit 76a624a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/include/test/unit_tdb_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,16 @@ TEST_CASE("tdb_io: create group", "[tdb_io]") {
auto num_members = read_group.member_count();
CHECK(num_members == 1);
auto a = read_group.member(0);
// CHECK(
// std::filesystem::path(a.uri().substr(7)).relative_path() ==
// std::filesystem::path(tmp_group_uri) / "ids");
const auto canonical_original_path =
tmp_group_uri[0] == '/' ? tmp_group_uri.substr(1) : tmp_group_uri;
CHECK(
std::filesystem::path(a.uri().substr(8)) ==
std::filesystem::path(canonical_original_path) / "ids");

auto b = read_group.member("ids");
// CHECK(
// std::filesystem::path(a.uri().substr(7)).relative_path() ==
// std::filesystem::path(tmp_group_uri) / "ids");
CHECK(
std::filesystem::path(a.uri().substr(8)) ==
std::filesystem::path(canonical_original_path) / "ids");

CHECK(read_group.has_metadata("w[0]", &w_type));
CHECK(!read_group.has_metadata("w[1]", &w_type));
Expand Down

0 comments on commit 76a624a

Please sign in to comment.