]> diplodocus.org Git - nmh/blobdiff - test/mhbuild/test-utf8-body
With whatnow attach, determine the content MIME type that's inserted
[nmh] / test / mhbuild / test-utf8-body
index 2998da4b8e2c0a0120201a0aac77a7ad6637badc..5539489c78feb75bcbcc9ce3e3beae10d6b6d31b 100755 (executable)
@@ -21,7 +21,7 @@ testname="${MH_TEST_DIR}/$$"
 #### Rely on sendmail/pipe below to override default mts.
 mts_fakesendmail="${MHMTSCONF}-fakesendmail"
 cp "${MHMTSCONF}" "$mts_fakesendmail"
 #### 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
 MHMTSCONF="$mts_fakesendmail"
 
 # argument: expected output
@@ -39,7 +39,7 @@ test_attachment ()
   # 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.
   #
   # 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"
       "`mhpath cur`" > "${testname}.actual"
 
   check "${testname}.actual" "$1"
@@ -93,7 +93,7 @@ To: Somebody <somebody@example.com>
 Subject: Test
 Nmh-Attachment: $MH_TEST_DIR/attachment.txt
 
 Subject: Test
 Nmh-Attachment: $MH_TEST_DIR/attachment.txt
 
-¡Ay, caramba!
+¡Ay, caramba!
 EOF
 
 cat > "${testname}.expected" <<EOF
 EOF
 
 cat > "${testname}.expected" <<EOF
@@ -108,7 +108,7 @@ Date:
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 
-=A1Ay, caramba!
+=C2=A1Ay, caramba!
 
 ------- =_aaaaaaaaaa0
 Content-Type: text/plain; name="attachment.txt"
 
 ------- =_aaaaaaaaaa0
 Content-Type: text/plain; name="attachment.txt"
@@ -125,3 +125,9 @@ test_attachment "${testname}.expected"
 rm -f ${MHMTSCONF} "${MH_TEST_DIR}/attachment.txt"
 
 exit ${failed:-0}
 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: