You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "maskit (via GitHub)" <gi...@apache.org> on 2023/06/27 18:58:12 UTC

[GitHub] [trafficserver] maskit commented on a diff in pull request #9919: Move URL escapify functions into tscore

maskit commented on code in PR #9919:
URL: https://github.com/apache/trafficserver/pull/9919#discussion_r1244213960


##########
proxy/logging/unit-tests/test_LogUtils.cc:
##########
@@ -150,52 +150,4 @@ TEST_CASE("get_unrolled_filename parses possible log files as expected", "[get_u
 
   constexpr ts::TextView no_dot = "logging_yaml";
   REQUIRE(get_unrolled_filename(no_dot) == no_dot);
-}
-
-TEST_CASE("LogUtils pure escapify url", "[pure_esc_url]")
-{
-  char input[][32] = {
-    " ",
-    "%",
-    "% ",
-    "%20",
-  };
-  const char *expected[] = {
-    "%20",
-    "%25",
-    "%25%20",
-    "%2520",
-  };
-  char output[128];
-  int output_len;
-
-  int n = sizeof(input) / sizeof(input[0]);
-  for (int i = 0; i < n; ++i) {
-    LogUtils::pure_escapify_url(NULL, input[i], std::strlen(input[i]), &output_len, output, 128);
-    CHECK(std::string_view(output) == expected[i]);
-  }
-}
-
-TEST_CASE("LogUtils escapify url", "[esc_url]")
-{
-  char input[][32] = {
-    " ",
-    "%",
-    "% ",
-    "%20",
-  };
-  const char *expected[] = {
-    "%20",
-    "%25",
-    "%25%20",
-    "%20",
-  };
-  char output[128];
-  int output_len;
-
-  int n = sizeof(input) / sizeof(input[0]);
-  for (int i = 0; i < n; ++i) {
-    LogUtils::escapify_url(NULL, input[i], std::strlen(input[i]), &output_len, output, 128);
-    CHECK(std::string_view(output) == expected[i]);
-  }
-}
+}

Review Comment:
   Do we require a trailing newline? I wonder if clang-format can correct it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org