]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: test-istream-base64-decoder - Add explicit test cases for decoding the empty...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 5 Sep 2019 09:50:04 +0000 (11:50 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 5 Sep 2019 12:22:21 +0000 (14:22 +0200)
src/lib/test-istream-base64-decoder.c

index bb4e6b3b31ad6b1cb3c7aa2a923b590cdc2665af..5f35a3da2e336c3f1a584ac160c3c44d12209341 100644 (file)
@@ -14,6 +14,7 @@ struct base64_istream_test {
 };
 
 static const struct base64_istream_test base64_tests[] = {
+       { "", "", 0 },
        { "aGVsbG8gd29ybGQ=", "hello world", 0 },
        { "\naGVs\nbG8g\nd29y\nbGQ=\n", "hello world", 0 },
        { "  aGVs    \r\n bG8g  \r\n   d29y  \t \r\n    bGQ= \r\n\r\n",
@@ -38,6 +39,7 @@ static const struct base64_istream_test base64_tests[] = {
 };
 
 static const struct base64_istream_test base64url_tests[] = {
+       { "", "", 0 },
        { "aGVsbG8gd29ybGQ=", "hello world", 0 },
        { "\naGVs\nbG8g\nd29y\nbGQ=\n", "hello world", 0 },
        { "  aGVs    \r\n bG8g  \r\n   d29y  \t \r\n    bGQ= \r\n\r\n",