diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2024-03-06 18:10:52 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2024-03-08 14:18:43 +0100 |
commit | ffeed0b29802118fddbf75a334bb32888a2363da (patch) | |
tree | 2daab672db0383cac15452e4765335be9ce55beb /test/other_tools/utils/curl_url.test.cpp | |
parent | 17f6d64660c1fed29a948ba39b4a190b9a243ebb (diff) | |
download | justbuild-ffeed0b29802118fddbf75a334bb32888a2363da.tar.gz |
Remove dead code for host replacement
Diffstat (limited to 'test/other_tools/utils/curl_url.test.cpp')
-rw-r--r-- | test/other_tools/utils/curl_url.test.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/test/other_tools/utils/curl_url.test.cpp b/test/other_tools/utils/curl_url.test.cpp index 210092e3..61c979af 100644 --- a/test/other_tools/utils/curl_url.test.cpp +++ b/test/other_tools/utils/curl_url.test.cpp @@ -135,30 +135,6 @@ TEST_CASE("Curl URL handle basics", "[curl_url_handle_basics]") { CHECK(key_h.value()->port.value() == "80"); // default http port CHECK(key_h.value()->path.string() == "/foo/bar?query#fragment/"); } - - SECTION("Replace hostname") { - // full syntax check - auto new_url_full = CurlURLHandle::ReplaceHostname( - "https://user:pass@example.com:50000/some/" - "pa.th?what=what&who=who#fragment", - "example.org"); - CHECK(new_url_full); - CHECK(*new_url_full == - "https://user:pass@example.org:50000/some/" - "pa.th?what=what&who=who#fragment"); - - // non-supported scheme, path not normalized, spaces allowed - auto new_url_special = CurlURLHandle::ReplaceHostname( - "socks5://example.com/f oo/. ./ba r # b oo", "example.org"); - REQUIRE(new_url_special); - CHECK(*new_url_special == "socks5://example.org/f oo/. ./ba r # b oo"); - - // missing scheme does not fail, but new URL does contain default https - auto new_url_default_scheme = - CurlURLHandle::ReplaceHostname("192.0.2.1", "192.0.2.10"); - REQUIRE(new_url_default_scheme); - CHECK(*new_url_default_scheme == "https://192.0.2.10/"); - } } TEST_CASE("Curl URL match config key", "[curl_url_match_config_key]") { |