diff --git a/tests/zm_utils.cpp b/tests/zm_utils.cpp index 887bda45a..1581949ff 100644 --- a/tests/zm_utils.cpp +++ b/tests/zm_utils.cpp @@ -144,3 +144,13 @@ TEST_CASE("join") { REQUIRE(join({"a", "b"}, ",") == "a,b"); REQUIRE(join({"a", "b"}, "") == "ab"); } + +TEST_CASE("base64Encode") { + REQUIRE(base64Encode("") == ""); + REQUIRE(base64Encode("f") == "Zg=="); + REQUIRE(base64Encode("fo") == "Zm8="); + REQUIRE(base64Encode("foo") == "Zm9v"); + REQUIRE(base64Encode("foob") == "Zm9vYg=="); + REQUIRE(base64Encode("fooba") == "Zm9vYmE="); + REQUIRE(base64Encode("foobar") == "Zm9vYmFy"); +}