From 30c4f6dab4681a60d08b56d9c0c2368ba84a3409 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Sun, 26 Feb 2012 12:12:28 -0500 Subject: [PATCH] Beginnings of a test suite for the mh-format support in forw. --- Makefile.am | 2 +- test/forw/test-forw-format | 75 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100755 test/forw/test-forw-format diff --git a/Makefile.am b/Makefile.am index 3f1650d..d99d46c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -44,7 +44,7 @@ TESTS = test/bad-input/test-header test/comp/test-comp-format \ test/folder/test-create \ test/folder/test-total test/format/test-localmbox \ test/format/test-myname test/format/test-myhost \ - test/format/test-mymbox \ + test/format/test-mymbox test/forw/test-forw-format \ test/inc/test-deb359167 test/inc/test-eom-align \ test/manpages/test-manpages test/mhbuild/test-forw \ test/mhpath/test-mhpath \ diff --git a/test/forw/test-forw-format b/test/forw/test-forw-format new file mode 100755 index 0000000..dc73c6c --- /dev/null +++ b/test/forw/test-forw-format @@ -0,0 +1,75 @@ +#!/bin/sh +# +# Tests to see if the -from, -to, -cc, -fcc, and -subject switches to +# "forw" work 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 + +# +# Create a test template file (we create one here just in case the master +# one changes) +# + +form="${MH_TEST_DIR}/$$.forwcomps" +cat > $form < +-------- +EOF + +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" +subject="Totally bogus subject" + +cat > "$expected" <> "$expected" + +cat >> "$expected" <