chiark / gitweb /
Further lib/ testing.
[disorder] / lib / t-mime.c
index eb5ee7ca2b609b340507609c8240cd5ba353e61a..5c3152a0c7d3ff6d421798afeab214e1055e9576 100644 (file)
@@ -220,7 +220,9 @@ void test_mime(void) {
               "Now's the time for all folk to come to the aid of their country.");
 
 #define check_base64(encoded, decoded) do {                     \
-    check_string(mime_base64(encoded, 0), decoded);             \
+    size_t ns;                                                  \
+    check_string(mime_base64(encoded, &ns), decoded);           \
+    insist(ns == (sizeof decoded) - 1);                         \
     check_string(mime_to_base64((const uint8_t *)decoded,       \
                                          (sizeof decoded) - 1), \
                  encoded);                                      \