From: Ken Hornstein Date: Tue, 4 Feb 2014 02:46:33 +0000 (-0500) Subject: Add a new (but incomplete) test for mhbuild's new functionality. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/95a485d2b8a2bf28fdb80ca62c12d0541ac0a2fc?ds=sidebyside;hp=e5078d5e41a7277c4f060e52f9ed7cb24f8a99f0 Add a new (but incomplete) test for mhbuild's new functionality. --- diff --git a/Makefile.am b/Makefile.am index 626fd829..bdcca089 100644 --- a/Makefile.am +++ b/Makefile.am @@ -66,6 +66,7 @@ TESTS = test/ali/test-ali test/anno/test-anno \ test/locking/test-datalocking test/locking/test-spoollocking \ test/manpages/test-manpages \ test/mhbuild/test-attach \ + test/mhbuild/test-cte \ test/mhbuild/test-forw test/mhbuild/test-header-encode \ test/mhbuild/test-utf8-body \ test/mhfixmsg/test-mhfixmsg \ diff --git a/test/mhbuild/test-cte b/test/mhbuild/test-cte new file mode 100755 index 00000000..e3f151a5 --- /dev/null +++ b/test/mhbuild/test-cte @@ -0,0 +1,50 @@ +#!/bin/sh +######################################################### +# +# Test the use of explicit Content-Transfer-Encoding tags +# +######################################################### + +if test -z "${MH_OBJ_DIR}"; then + srcdir=`dirname "$0"`/../.. + MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR +fi + +. "$MH_OBJ_DIR/test/common.sh" + +setup_test + +LC_ALL=en_US.UTF-8; export LC_ALL + +draft="$MH_TEST_DIR/$$.draft" +expected="$MH_TEST_DIR/$$.expected" + +# +# Force some text to be quoted-printable +# + +cat > "$draft" < +cc: +Fcc: +outbox +------ +# "$expected" < +cc: +Fcc: +outbox +MIME-Version: 1.0 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +This is a test of a message with a sh=C3=B8rt line. +EOF + +check "$draft" "$expected" + +exit ${failed:-0}