about summary refs log tree commit diff
path: root/t/1700-mshow.t
diff options
context:
space:
mode:
Diffstat (limited to 't/1700-mshow.t')
-rwxr-xr-xt/1700-mshow.t41
1 files changed, 41 insertions, 0 deletions
diff --git a/t/1700-mshow.t b/t/1700-mshow.t
new file mode 100755
index 0000000..f974026
--- /dev/null
+++ b/t/1700-mshow.t
@@ -0,0 +1,41 @@
+#!/bin/sh -e
+cd ${0%/*}
+. ./lib.sh
+plan 2
+
+# Nested MIME where the outer boundary is a prefix of the inner boundary
+cat <<EOF >tmp
+MIME-Version: 1.0
+Content-type: multipart/mixed; charset=iso-8859-1;
+ boundary="_xec5AqfRYxfhARmklHx"
+
+
+--_xec5AqfRYxfhARmklHx
+Content-type: Multipart/alternative; charset=iso-8859-1;
+ boundary="_xec5AqfRYxfhARmklHx8"
+
+
+--_xec5AqfRYxfhARmklHx8
+Content-type: text/plain; charset=iso-8859-1
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+foo
+--_xec5AqfRYxfhARmklHx8
+Content-type: text/html; charset=iso-8859-1
+Content-Transfer-Encoding: Quoted-printable
+Content-Disposition: inline
+
+bar
+--_xec5AqfRYxfhARmklHx8--
+
+--_xec5AqfRYxfhARmklHx
+Content-Type: application/zip
+Content-Transfer-Encoding: Base64
+
+quux
+--_xec5AqfRYxfhARmklHx--
+EOF
+
+check 'nested mail has 5 attachments' 'mshow -t ./tmp | wc -l | grep 6'
+check 'nested mail has text/html attachment' 'mshow -t ./tmp | grep text/html'