about summary refs log tree commit diff
path: root/t
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-11-12 15:24:20 +0100
committerLeah Neukirchen <leah@vuxu.org>2020-11-12 15:28:49 +0100
commit5167bbfe39c4e87c6aeeafce4546ca19878b4fef (patch)
treec2d0bbe991eda7daff70996df98295792844dc8f /t
parent5e6151e3bf8aa13a3849997ed49953362887ff5a (diff)
downloadmblaze-5167bbfe39c4e87c6aeeafce4546ca19878b4fef.tar.gz
mblaze-5167bbfe39c4e87c6aeeafce4546ca19878b4fef.tar.xz
mblaze-5167bbfe39c4e87c6aeeafce4546ca19878b4fef.zip
rfc2045: ensure mime boundaries end with a newline or -
Diffstat (limited to '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'