nmh-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated


From: Ken Hornstein
Subject: [Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 98e2ac4aa016aecbca7e9b8e8bcb8ecfa7bba1b5
Date: Thu, 23 Feb 2012 17:03:54 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The nmh Mail Handling System".

The branch, master has been updated
       via  98e2ac4aa016aecbca7e9b8e8bcb8ecfa7bba1b5 (commit)
      from  fd250083492420769109b2d07790e8c695a2e2ed (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=98e2ac4aa016aecbca7e9b8e8bcb8ecfa7bba1b5


commit 98e2ac4aa016aecbca7e9b8e8bcb8ecfa7bba1b5
Author: Ken Hornstein <address@hidden>
Date:   Thu Feb 23 12:03:09 2012 -0500

    Create a test for the new mh-format processing available in comp(1).

diff --git a/Makefile.am b/Makefile.am
index e86320e..2d3342b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,7 +40,8 @@ TESTS_ENVIRONMENT = address@hidden@ \
 ##
 ## Important note: the "cleanup" test should always be last
 ##
-TESTS = test/bad-input/test-header test/folder/test-create \
+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 \
diff --git a/test/comp/test-comp-format b/test/comp/test-comp-format
new file mode 100755
index 0000000..1f1f8c5
--- /dev/null
+++ b/test/comp/test-comp-format
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# Tests to see if the -from, -to, -cc, -fcc, and -subject switches to
+# "comp" 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}/$$.components"
+cat > $form <<EOF
+%(void{from})%(void(width))%(putaddr From: )
+%(void{to})%(void(width))%(putaddr To: )
+%(void{cc})%(void(width))%(putaddr cc: )
+Fcc: %{fcc}
+Subject: %{subject}
+--------
+EOF
+
+expected="${MH_TEST_DIR}/$$.expected"
+actual="${MH_TEST_DIR}/Mail/draft"
+from="Mr Test User <address@hidden>"
+to1="User One <address@hidden>"
+to2="User Two <address@hidden>"
+cc1="CC User One <address@hidden>"
+cc2="CC User Two <address@hidden>"
+cc3="CC User Three <address@hidden>"
+cc4="CC User Four <address@hidden>"
+fcc1="+nosuchmailbox"
+fcc2="+nosuchmailbox2"
+subject="Totally bogus subject"
+
+cat > $expected <<EOF
+From: ${from}
+To: ${to1}, ${to2}
+cc: ${cc1},
+    ${cc2},
+    ${cc3},
+    ${cc4}
+Fcc: ${fcc1}, ${fcc2}
+Subject: ${subject}
+--------
+EOF
+
+comp -editor true -form "${form}" -from "${from}" -to "${to1}" -to "${to2}" \
+    -cc "${cc1}" -cc "${cc2}" -cc "${cc3}" -cc "${cc4}" -fcc "${fcc1}" \
+    -fcc "${fcc2}" -subject "${subject}" -width 60 -nowhatnowproc || exit 1
+
+check "${expected}" "${actual}"
+
+test "${failed:-0}" -eq 0 && rm "${form}"
+
+exit $failed

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                |    3 +-
 test/comp/test-comp-format |   64 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 1 deletions(-)
 create mode 100755 test/comp/test-comp-format


hooks/post-receive
-- 
The nmh Mail Handling System



reply via email to

[Prev in Thread] Current Thread [Next in Thread]