--- /dev/null
+From test Sat Feb 1 00:00:00 2014
+Return-Path: <xx@xx.dk>
+Received: from fepD.post.tele.dk (195.41.46.149) by mail.groupcare.dk (LSMTP for Windows NT v1.1b) with SMTP id <0.0014F8A2@mail.groupcare.dk>; Mon, 30 Apr 2001 12:17:50 +0200
+User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2106
+Subject: XX
+From: xx@xx.dk
+To: XX
+Message-ID: <xxxx>
+Mime-version: 1.0
+Content-type: multipart/mixed;
+ boundary="MS_Mac_OE_3071477847_720252_MIME_Part"
+
+> Denne meddelelse er i MIME-format. Da dit postl
+
+--MS_Mac_OE_3071477847_720252_MIME_Part
+Content-type: multipart/alternative;
+ boundary="MS_Mac_OE_3071477847_720252_MIME_Part"
+
+
+
+--MS_Mac_OE_3071477847_720252_MIME_Part
+Content-transfer-encoding: 8bit
+X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode.py
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+X-MIME-Autoconverted: from iso-8859-1 to utf-8 by test id mimedecode.py
+
+Some removed test.
+
+--MS_Mac_OE_3071477847_720252_MIME_Part
+Content-type: text/html; charset="ISO-8859-1"
+Content-transfer-encoding: 8bit
+X-MIME-Autoconverted: from quoted-printable to 8bit by test id mimedecode.py
+
+<HTML>
+<HEAD>
+<TITLE>Some removed HTML</TITLE>
+</HEAD>
+<BODY>
+Some removed text.
+</BODY>
+</HTML>
+
+
+--MS_Mac_OE_3071477847_720252_MIME_Part--
+
+
+--MS_Mac_OE_3071477847_720252_MIME_Part
+Content-type: image/gif; name="xx.gif";
+ x-mac-creator="6F676C65";
+ x-mac-type="47494666"
+Content-disposition: attachment
+Content-transfer-encoding: base64
+
+Some removed base64 encoded chars.
+
+--MS_Mac_OE_3071477847_720252_MIME_Part--
+
RC=0
test1() {
- ../mimedecode.py -H test -f utf-8 input/"$1" >tmp/"$1" || return 1
- if cmp -s expected/"$2" tmp/"$1"; then
- rm tmp/"$1" && return 0 || return 1
+ infile="$1"
+ shift
+ expfile="$1"
+ shift
+
+ ../mimedecode.py -H test -f utf-8 "$@" input/"$infile" >tmp/"$expfile" || return 1
+ if cmp -s expected/"$expfile" tmp/"$expfile"; then
+ rm tmp/"$expfile" && return 0 || return 1
else
- diff --text expected/"$2" tmp/"$1" >tmp/"$1".diff
+ diff --text expected/"$expfile" tmp/"$expfile" >tmp/"$expfile".diff
return 1
fi
}
test_file() {
echo -n "$2 "
- if test1 "$1" "$2"; then
+ if test1 "$@"; then
echo "ok"
else
echo "fail"
test_file "$n" "$n"
done
+test_file msg_15.txt msg_15-1.txt -b text/html
+
if [ "$RC" -eq 0 ]; then
echo "All tests passed!"
rmdir tmp