Skip to content

Commit

Permalink
Fix tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv committed Oct 3, 2023
1 parent 3fb7bae commit 6f95573
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libmamba/tests/src/specs/test_channel_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ TEST_SUITE("specs::channel_spec")

SUBCASE("/Users/name/conda")
{
const auto expected_folder = fs::absolute("/Users/name/conda").lexically_normal();
const auto spec = ChannelSpec::parse("/Users/name/conda");
CHECK_EQ(spec.type(), Type::Path);
CHECK_EQ(spec.location(), "file:///Users/name/conda");
CHECK_EQ(spec.location(), util::concat("file://", util::path_to_posix(expected_folder)));
CHECK_EQ(spec.platform_filters(), PlatformSet{});
}

SUBCASE("./folder/../folder/.")
{
const auto expected_folder = fs::weakly_canonical("./folder");
const auto expected_folder = fs::absolute("folder").lexically_normal();
const auto spec = ChannelSpec::parse("./folder/../folder/.");
CHECK_EQ(spec.type(), Type::Path);
CHECK_EQ(spec.location(), util::concat("file://", util::path_to_posix(expected_folder)));
Expand All @@ -75,9 +76,10 @@ TEST_SUITE("specs::channel_spec")

SUBCASE("/tmp/pkg-0.0-bld.tar.bz2")
{
const auto expected_folder = fs::absolute("/tmp/pkg-0.0-bld.tar.bz2").lexically_normal();
const auto spec = ChannelSpec::parse("/tmp/pkg-0.0-bld.tar.bz2");
CHECK_EQ(spec.type(), Type::PackagePath);
CHECK_EQ(spec.location(), "file:///tmp/pkg-0.0-bld.tar.bz2");
CHECK_EQ(spec.location(), util::concat("file://", util::path_to_posix(expected_folder)));
CHECK_EQ(spec.platform_filters(), PlatformSet{});
}

Expand Down

0 comments on commit 6f95573

Please sign in to comment.