]> diplodocus.org Git - nmh/blobdiff - test/mhbuild/test-utf8-body
Support for selectable Content-Transfer-Encoding.
[nmh] / test / mhbuild / test-utf8-body
index 47229de6ab387addf07f336bb3a5ad7ab0b34ef3..9798ac26b1ae17d121c9508f030c3f30b1dc04e9 100755 (executable)
@@ -27,7 +27,7 @@ MHMTSCONF="$mts_fakesendmail"
 # argument: expected output
 test_attachment ()
 {
 # 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
 
   # fakesendmail drops the message and any cc's into this mbox.
   mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox
@@ -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"
@@ -54,7 +54,7 @@ cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: Somebody <somebody@example.com>
 Subject: Test
 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
 
 This is a test.
 EOF
@@ -91,9 +91,9 @@ cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: Somebody <somebody@example.com>
 Subject: Test
 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
 EOF
 
 cat > "${testname}.expected" <<EOF
@@ -102,13 +102,14 @@ To: Somebody <somebody@example.com>
 Subject: Test
 MIME-Version: 1.0
 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
 Subject: Test
 MIME-Version: 1.0
 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
+Content-Transfer-Encoding: 8bit
 Date:
 
 ------- =_aaaaaaaaaa0
 Content-Type: text/plain
 Date:
 
 ------- =_aaaaaaaaaa0
 Content-Type: text/plain
-Content-Transfer-Encoding: quoted-printable
+Content-Transfer-Encoding: 8bit
 
 
-=A1Ay, caramba!
+¡Ay, caramba!
 
 ------- =_aaaaaaaaaa0
 Content-Type: text/plain; name="attachment.txt"
 
 ------- =_aaaaaaaaaa0
 Content-Type: text/plain; name="attachment.txt"
@@ -125,3 +126,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: