From 527e5d552b64c00f4af27007c37de5bf8f100c80 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 26 Mar 2024 15:00:48 +0100 Subject: third-party: Update libcurl to v8.6.0 Now the curl URL API always fails to parse the empty string, so our test was changed to reflect this. --- test/other_tools/utils/curl_url.test.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'test/other_tools/utils/curl_url.test.cpp') diff --git a/test/other_tools/utils/curl_url.test.cpp b/test/other_tools/utils/curl_url.test.cpp index 61c979af..a591ac92 100644 --- a/test/other_tools/utils/curl_url.test.cpp +++ b/test/other_tools/utils/curl_url.test.cpp @@ -107,15 +107,21 @@ TEST_CASE("Curl URL handle basics", "[curl_url_handle_basics]") { REQUIRE(ret_url_bare_ip); CHECK(*ret_url_bare_ip == "http://192.0.2.1/"); - // default scheme, no authority, path not normalized + // default scheme, no authority, path normalized + auto url_h_root_path = CurlURLHandle::CreatePermissive( + "/", false, true, false, true, true); + CHECK(url_h_root_path); + CHECK(*url_h_root_path); + // check what was stored: scheme http, path single slash + auto ret_url_root_path = url_h_root_path.value()->GetURL(); + REQUIRE(ret_url_root_path); + CHECK(*ret_url_root_path == "https:///"); + + // empty url should fail (with even the most permissive options) auto url_h_empty = CurlURLHandle::CreatePermissive("", false, true, false, true, true); CHECK(url_h_empty); - CHECK(*url_h_empty); - // check what was stored: scheme http, path single slash - auto ret_url_empty = url_h_empty.value()->GetURL(); - REQUIRE(ret_url_empty); - CHECK(*ret_url_empty == "https:///"); + CHECK_FALSE(*url_h_empty); } SECTION("Parse config key") { -- cgit v1.2.3