+ok(Debbugs::MIME::decode_rfc1522(Debbugs::MIME::encode_rfc1522(encode_utf8($test_str3))) eq $test_str3,
+ "encode_rfc1522 properly handles parenthesis and \"");
+ok(Debbugs::MIME::handle_escaped_commas(q(),q(From: =?UTF-8?Q?Armstrong=2C?= Don <don@donarmstrong.com>)) eq q("Armstrong, Don" <don@donarmstrong.com>),
+ "handle_escaped_commas properly handles commas in RFC1522 encoded strings");
+
+# Make sure that create_mime_message has encoded headers and doesn't enclude any 8-bit characters
+
+$test_str = Encode::encode("UTF-8",$test_str);
+ok(Debbugs::MIME::create_mime_message([Subject => $test_str,
+ From => $test_str,
+ ],
+ $test_str,
+ [],
+ ) !~ m{([\xF0-\xFF]+)},
+ "create_mime_message properly encodes 8bit messages."
+ );