diff --git a/test/units/base64.c b/test/units/base64.c index 296474c..fcf4010 100644 --- a/test/units/base64.c +++ b/test/units/base64.c @@ -180,7 +180,15 @@ static bool test_base64_decode_odd( .err = CYAML_OK, }, { - .name = "no_padding", + .name = "no_padding_1", + .enc = "S2l0dHk", + .enc_len = 7, + .dec = "Kitty", + .dec_len = 5, + .err = CYAML_OK, + }, + { + .name = "no_padding_2", .enc = "8J+YuA", .enc_len = 6, .dec = "😸", @@ -223,6 +231,12 @@ static bool test_base64_decode_odd( .enc_len = 4, .err = CYAML_ERR_INVALID_BASE64, }, + { + .name = "wrong_padding", + .enc = "S2l0dHk==", + .enc_len = 9, + .err = CYAML_ERR_INVALID_BASE64, + }, }; for (unsigned i = 0; i < CYAML_ARRAY_LEN(odd_data); i++) {