tests/utils: Add tests for UriDecode

This commit is contained in:
Peter Keresztes Schmidt 2021-04-03 22:03:50 +02:00
parent 46a4b615c8
commit fa7c420442
1 changed files with 5 additions and 0 deletions

View File

@ -154,3 +154,8 @@ TEST_CASE("base64Encode") {
REQUIRE(base64Encode("fooba") == "Zm9vYmE="); REQUIRE(base64Encode("fooba") == "Zm9vYmE=");
REQUIRE(base64Encode("foobar") == "Zm9vYmFy"); REQUIRE(base64Encode("foobar") == "Zm9vYmFy");
} }
TEST_CASE("UriDecode") {
REQUIRE(UriDecode("abcABC123-_.~%21%28%29%26%3d%20") == "abcABC123-_.~!()&= ");
REQUIRE(UriDecode("abcABC123-_.~%21%28%29%26%3d+") == "abcABC123-_.~!()&= ");
}