Skip to content

Commit 199b995

Browse files
committed
Fix tests again
1 parent 56cef87 commit 199b995

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

libmamba/src/util/url.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ namespace mamba::util
103103
auto CurlUrl::parse(const std::string& url, flag_type flags)
104104
-> tl::expected<CurlUrl, URL::ParseError>
105105
{
106-
std::cout << "CurlUrl::parse, url: " << url << std::endl;
106+
// std::cout << "CurlUrl::parse, url: " << url << std::endl;
107107
auto out = CurlUrl();
108108
const CURLUcode uc = ::curl_url_set(out.m_handle.get(), CURLUPART_URL, url.c_str(), flags);
109109
if (uc != CURLUE_OK)
110110
{
111-
std::cout << "NOT OK" << std::endl;
111+
// std::cout << "NOT OK" << std::endl;
112112
return tl::make_unexpected(URL::ParseError{
113113
fmt::format(R"(Failed to parse URL "{}": {})", url, ::curl_url_strerror(uc)) });
114114
}

libmamba/src/util/url_manip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ namespace mamba::util
120120

121121
auto file_uri_unc2_to_unc4(std::string_view uri) -> std::string
122122
{
123-
std::cout << "In file_uri_unc2_to_unc4, uri: " << uri << std::endl;
123+
// std::cout << "In file_uri_unc2_to_unc4, uri: " << uri << std::endl;
124124
auto [is_file_scheme, slashes, rest] = check_file_scheme_and_slashes(uri);
125125
if (!is_file_scheme)
126126
{

libmamba/tests/src/specs/test_conda_url.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,16 @@ namespace
545545
SECTION("file://D:/a/_temp/popen-gw0/some_other_parts")
546546
{
547547
auto url = CondaURL::parse("file://D:/a/_temp/popen-gw0/some_other_parts").value();
548-
REQUIRE(url.path() == "//D:/a/_temp/popen-gw0/some_other_parts");
549548
REQUIRE(url.str() == "file:////D:/a/_temp/popen-gw0/some_other_parts");
550549
REQUIRE(url.pretty_str() == "file:////D:/a/_temp/popen-gw0/some_other_parts");
550+
if (mamba::util::on_win)
551+
{
552+
REQUIRE(url.path() == "/D:/a/_temp/popen-gw0/some_other_parts");
553+
}
554+
else
555+
{
556+
REQUIRE(url.path() == "//D:/a/_temp/popen-gw0/some_other_parts");
557+
}
551558
}
552559

553560
SECTION("file://ab/_temp/popen-gw0/some_other_parts")

0 commit comments

Comments
 (0)