From: Ken Hornstein Date: Sun, 26 Feb 2012 17:12:28 +0000 (-0500) Subject: Beginnings of a test suite for the mh-format support in forw. X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=30c4f6dab4681a60d08b56d9c0c2368ba84a3409;p=mmh Beginnings of a test suite for the mh-format support in forw. --- 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" <