#### Rely on sendmail/pipe below to override default mts.
mts_fakesendmail="${MHMTSCONF}-fakesendmail"
cp "${MHMTSCONF}" "$mts_fakesendmail"
-printf "sendmail: ${srcdir}/test/fakesendmail\n" >>"$mts_fakesendmail"
+printf 'sendmail: %s/test/fakesendmail\n' "$srcdir" >>"$mts_fakesendmail"
MHMTSCONF="$mts_fakesendmail"
# argument: expected output
test_attachment ()
{
- send -draft -mts sendmail/pipe
+ run_prog send -draft -mts sendmail/pipe
# fakesendmail drops the message and any cc's into this mbox.
mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox
# use, so we'll just use sed to remove the actual date so we can easily
# compare it against our "correct" output. And same for charset.
#
- sed -e 's/^Date:.*/Date:/' -e 's/; charset=".*//' \
+ sed -e 's/^Date:.*/Date:/' -e 's/; charset="[^;]*//' \
"`mhpath cur`" > "${testname}.actual"
check "${testname}.actual" "$1"
From: Mr Nobody <nobody@example.com>
To: Somebody <somebody@example.com>
Subject: Test
-Nmh-Attachment: $MH_TEST_DIR/attachment.txt
+Attach: $MH_TEST_DIR/attachment.txt
This is a test.
EOF
From: Mr Nobody <nobody@example.com>
To: Somebody <somebody@example.com>
Subject: Test
-Nmh-Attachment: $MH_TEST_DIR/attachment.txt
+Attach: $MH_TEST_DIR/attachment.txt
-¡Ay, caramba!
+¡Ay, caramba!
EOF
cat > "${testname}.expected" <<EOF
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
-=A1Ay, caramba!
+=C2=A1Ay, caramba!
------- =_aaaaaaaaaa0
Content-Type: text/plain; name="attachment.txt"
rm -f ${MHMTSCONF} "${MH_TEST_DIR}/attachment.txt"
exit ${failed:-0}
+
+# emacs hackage to ensure that it writes the inverted exclamation
+# point as UTF-8 multibyte character \xC2\xA1 instead of just \xA1.
+# Local Variables:
+# coding: utf-8
+# End: