Add possibility to trigger the mimeparser internal encoding-decoder
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 2 Dec 2010 00:17:05 +0000 (01:17 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Thu, 2 Dec 2010 00:17:05 +0000 (01:17 +0100)
libcitadel/tests/mimeparser_test.c

index 83d5bf0f5547273d52c3c3a97ea7941200bf7d2a..95802ff43eae7f377dd8d22707fa39e2f2b9d9fd 100644 (file)
@@ -13,7 +13,6 @@
 #include <stddef.h>
 
 
-#include "stringbuf_test.h"
 #include "../lib/libcitadel.h"
 
 /* shamelesly copied from msgbase.h */
@@ -203,11 +202,12 @@ int main(int argc, char* argv[])
        char *MimeStr;
        struct ma_info ma;
        int do_proto = 0;
+       int dont_decode = 1;
 
        setvbuf(stdout, NULL, _IONBF, 0);
 
 
-       while ((a = getopt(argc, argv, "F:f:p")) != EOF)
+       while ((a = getopt(argc, argv, "dpf:")) != EOF)
        {
                switch (a) {
                case 'f':
@@ -216,6 +216,9 @@ int main(int argc, char* argv[])
                case 'p':
                        do_proto = 1;
                        break;
+               case 'd':
+                       dont_decode = 0;
+                       break;
                }
        }
        StartLibCitadel(8);
@@ -248,7 +251,7 @@ int main(int argc, char* argv[])
                    (do_proto ? *list_this_part : NULL),
                    (do_proto ? *list_this_pref : NULL),
                    (do_proto ? *list_this_suff : NULL),
-                   (void *)&ma, 1);
+                   (void *)&ma, dont_decode);
 
 
        free(MimeStr);