]> diplodocus.org Git - nmh/commitdiff
Fixed test-utf8-body to actually contain the UTF-8 character
authorDavid Levine <levinedl@acm.org>
Sun, 6 Jan 2013 15:38:21 +0000 (09:38 -0600)
committerDavid Levine <levinedl@acm.org>
Sun, 6 Jan 2013 15:38:21 +0000 (09:38 -0600)
instead of the single byte, 8-bit character.  This was caught
using Heirloom shell with a UTF-8 locale:  when it wrote the
test draft from a here document, it converted the single byte
character to UTF-8.  This verifies that behavior:

LANG=en_US.utf-8 /usr/lib/heirloom/5bin/sh -c "od -x <<EOF
`printf '\xA1'`
EOF
"

test/mhbuild/test-utf8-body

index 47229de6ab387addf07f336bb3a5ad7ab0b34ef3..3446153f9a9d8aad490d1c49ab989aa5f2017617 100755 (executable)
@@ -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: