]> diplodocus.org Git - nmh/blobdiff - test/dist/test-dist
Fix to commit 0d3875d020fb17d34918f5e81ee7f87fbc5d1565: it seems
[nmh] / test / dist / test-dist
index c5182afaf8b55c72b19aa095cdbe17bbd53265e4..155f773301d42900f6926adc096449d4edff0a41 100755 (executable)
@@ -31,7 +31,7 @@ MHMTSCONF="$mts_fakesendmail"
 # arguments: dist switches
 test_dist ()
 {
-  printf 'send\n' | dist "$@" >/dev/null
+  printf 'send\n' | run_prog dist "$@" >/dev/null
 
   # fakesendmail drops the message and any cc's into this mbox.
   mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox
@@ -384,5 +384,27 @@ EOF
 test_dist +inbox 1 -noedit -to somebody@example.com -fcc +outbox
 run_test 'scan +outbox -width 6 2' '   2 '
 
+#
+# Check that dist encodes headers using RFC-2047 properly
+#
+
+require_locale en_US.utf-8 en_US.utf8
+LC_ALL=en_US.UTF-8; export LC_ALL
+
+cat >"$expected" <<EOF
+From: Test1 <test1@example.com>
+To: Some User <user@example.com>
+Date: Fri, 29 Sep 2006 00:00:00
+Message-Id: 1@test.nmh
+Subject: Testing message 1
+Resent-From: =?UTF-8?Q?Mr_F=C3=B8o_Bar?= <foo@bar.com>
+Resent-To: =?UTF-8?Q?Mr_Nobod=C3=BF?= <nobody@nowhere.com>
+Resent-Date:
+
+This is message number 1
+EOF
+
+test_dist +inbox 1 -noedit -from 'Mr Føo Bar <foo@bar.com>' \
+         -to 'Mr Nobodÿ <nobody@nowhere.com>' -fcc +outbox
 
 exit ${failed:-0}