aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test6.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test6.c')
-rw-r--r--tests/test6.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/test6.c b/tests/test6.c
new file mode 100644
index 0000000000..ead8312c52
--- /dev/null
+++ b/tests/test6.c
@@ -0,0 +1,50 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/* test for the RFC 2047 encoder */
+
+#include <string.h>
+#include <unicode.h>
+
+#include "gmime-utils.h"
+#include "stdio.h"
+#include "camel-log.h"
+#include "camel-mime-message.h"
+#include "camel-mime-part.h"
+#include "camel-stream.h"
+#include "camel-stream-fs.h"
+#include "camel.h"
+#include "gmime-rfc2047.h"
+
+#define TERMINAL_CHARSET "UTF-8"
+
+/*
+ * Info on many unicode issues, including, utf-8 xterms from :
+ *
+ * http://www.cl.cam.ac.uk/~mgk25/unicode.html
+ *
+ */
+
+const char *tests[] =
+{
+ "is is a test", "ISO-8859-1",
+ "Itrtinlation", "ISO-8859-1",
+ "Καλημέρα κόσμε", "UTF-8",
+ "コンニチハ", "UTF-8",
+ "ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn", "UTF-8",
+ NULL
+};
+
+
+int
+main (int argc, char**argv)
+{
+ const char **b = tests;
+ while (*b) {
+ char *e = gmime_rfc2047_encode(b[0], b[1]);
+ printf("%s\t%s\n", e, gmime_rfc2047_decode(e, TERMINAL_CHARSET));
+ b+=2;
+ }
+
+ return 0;
+
+}
Convert bsd.gnustep.mk to USES=gnustepbapt2015-04-091-12/+8 * databases category: Remove $PTHREAD_LIBSmarino2015-03-251-2/+1 * Finally retire USE_PGSQLcrees2014-11-231-1/+1 * Cleanup plistbapt2014-10-201-19/+0 * Remove duplicate line from plistantoine2014-08-111-1/+0 * Bump PORTREVISION on more ports that depend on libgcrypt after the updatetijl2014-08-061-1/+1 * Bump PORTREVISION on all ports with USE_SQLITE=yes or USE_SQLITE=3 thattijl2014-07-041-0/+1 * Fix the pkg-plist for performance.theraven2013-10-083-27/+27 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * - cleanup commentsdinoex2012-10-131-5/+0 * - reset MAINTAINERdinoex2012-06-261-1/+1 * - cleanup for gnustep-1.24.0dinoex2012-06-091-1/+1 * - update to 1.5.3dinoex2011-10-122-3/+3 * - update to 1.5.2dinoex2011-09-202-3/+3 * - update GNUSTEP_DEVEL to 1.22.0dinoex2011-04-161-0/+1 * - update to 1.5.1dinoex2011-04-103-10/+21 * - Get Rid MD5 supportmiwi2011-03-201-1/+0 * Bump PORTREVISION for ports linking to default libmysqlclient.ale2011-03-191-1/+1 * LICENSE LGPL21dinoex2010-06-051-1/+1 * LICENSE GPLv2dinoex2010-06-041-0/+2 * - drop USE_GNUSTEP_PREFIXdinoex2010-05-302-42/+41 * - cleanup ADDITIONAL_LIB_DIRSdinoex2009-07-051-1/+0 * - fix buildwith custom LOCALBASEdinoex2009-06-051-1/+1 * - add LICENSE:dinoex2009-01-171-0/+2 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-0/+1 * - update for gnustep-make-2.0.0dinoex2007-05-251-0/+1 * - add category gnustepdinoex2007-02-011-1/+1 * - update to 1.3.0dinoex2007-01-293-5/+7 * - update to use new bsd.gnustep.mkdinoex2007-01-131-11/+2