From 027327f82f3672985aa02fb84e558341ca8b9a1f Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Sun, 26 Feb 2012 21:29:01 -0500 Subject: [PATCH] A test for forw -digest. It doesn't quite work yet. --- Makefile.am | 1 + etc/digestcomps | 4 ++-- test/forw/test-forw-digest | 50 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100755 test/forw/test-forw-digest diff --git a/Makefile.am b/Makefile.am index 0889486..8ab7a72 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,6 +45,7 @@ TESTS = test/bad-input/test-header test/comp/test-comp-format \ test/folder/test-total test/format/test-localmbox \ test/format/test-myname test/format/test-myhost \ test/format/test-mymbox test/forw/test-forw-format \ + test/forw/test-forw-digest \ test/inc/test-deb359167 test/inc/test-eom-align \ test/manpages/test-manpages test/mhbuild/test-forw \ test/mhpath/test-mhpath \ diff --git a/etc/digestcomps b/etc/digestcomps index fdb55f8..5b310d5 100644 --- a/etc/digestcomps +++ b/etc/digestcomps @@ -1,5 +1,5 @@ -From: %{digest}-Request -To: %{digest} Distribution: dist-%{digest}; +%<{nmh-from}%(void(width))%(putaddr From: )%|From: %{digest}-Request%> +%<{nmh-to}%(void(width))%(putaddr To: )%|To: %{digest} Distribution: dist-%{digest};%> Subject: %{digest} Digest V%(cur) #%(msg) Reply-To: %{digest} -------- diff --git a/test/forw/test-forw-digest b/test/forw/test-forw-digest new file mode 100755 index 0000000..9d62fc8 --- /dev/null +++ b/test/forw/test-forw-digest @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Tests to see if "forw -digest" works correctly. +# + +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 + +expected="${MH_TEST_DIR}/$$.expected" +actual="${MH_TEST_DIR}/Mail/draft" +from="Mr Test User " +to1="User One " +to2="User Two " +cc1="CC User One " +cc2="CC User Two " +cc3="CC User Three " +cc4="CC User Four " +fcc1="+nosuchmailbox" +fcc2="+nosuchmailbox2" + +cat > "$expected" <