]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add more edge-case tests for `cleanSlashes()` (from Otto) 13513/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 20 Nov 2023 14:24:44 +0000 (15:24 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Nov 2023 14:24:44 +0000 (15:24 +0100)
Co-authored-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/test-misc_hh.cc

index 6e5662b19e384c5f2bf91cdf9925960892cc6406..b3f0b3a4c223e30e40357c66f7626a9120dfeaed 100644 (file)
@@ -403,6 +403,9 @@ BOOST_AUTO_TEST_CASE(test_CleanSlashes) {
     cleanSlashes(fullStr);
     return fullStr;
   };
+  BOOST_CHECK_EQUAL(cleanSlashesWrapper(""), "");
+  BOOST_CHECK_EQUAL(cleanSlashesWrapper("/"), "/");
+  BOOST_CHECK_EQUAL(cleanSlashesWrapper("//"), "/");
   BOOST_CHECK_EQUAL(cleanSlashesWrapper("/test"), "/test");
   BOOST_CHECK_EQUAL(cleanSlashesWrapper("//test"), "/test");
   BOOST_CHECK_EQUAL(cleanSlashesWrapper("///test"), "/test");