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: David Levine
Subject: [Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 484a9acf0e463a588cc050229aabf1cb453b89c4
Date: Sat, 18 Feb 2012 23:32:26 +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  484a9acf0e463a588cc050229aabf1cb453b89c4 (commit)
       via  265bf7d31f31962e9b72227d253d278c4da6cd58 (commit)
       via  4d6cfbb1c9b425cb693e5189a19e132c67f5494a (commit)
      from  c6bf562d9e823f02fb4a9e6dfb89bf93a0e9d0ab (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=484a9acf0e463a588cc050229aabf1cb453b89c4


commit 484a9acf0e463a588cc050229aabf1cb453b89c4
Author: David Levine <address@hidden>
Date:   Sat Feb 18 17:32:15 2012 -0600

    Moved "make check" to after "make install".

diff --git a/INSTALL b/INSTALL
index 1da728e..a2e2d61 100644
--- a/INSTALL
+++ b/INSTALL
@@ -50,12 +50,7 @@ need an ANSI C compiler such as gcc.
 
 3) make
 
-4) make check
-
-   This takes a bit of time, around one minute on a modern machine,
-   but is highly recommended.
-
-5) make install
+4) make install
 
    Note that if you have [n]mh files in your install directories with
    the same names as the files being installed, the old ones will get
@@ -66,7 +61,7 @@ need an ANSI C compiler such as gcc.
    make is processing that directory to see if you need to merge
    changes from *.prev files into the new versions.
 
-6) Edit the file `mts.conf' (installed in the nmh `etc' directory)
+5) Edit the file `mts.conf' (installed in the nmh `etc' directory)
    and make any necessary changes for the mail transport interface
    you are using.
 
@@ -100,7 +95,7 @@ need an ANSI C compiler such as gcc.
    default value allows the most flexibility.  See the discussion of the
    --enable-masquerade configure option below).
 
-7) Edit the file `mhn.defaults' (installed in the nmh `etc' directory).
+6) Edit the file `mhn.defaults' (installed in the nmh `etc' directory).
    This file contains the default profile entries for the nmh command
    `mhn' and is created by the script `mhn.defaults.sh'.  This script
    will search a generic path (essentially your $PATH) for programs to
@@ -121,6 +116,13 @@ need an ANSI C compiler such as gcc.
    "MH & xmh: Email for Users and Programmers", 3rd edition, by Jerry Peek,
    on the Internet at <http://rand-mh.sourceforge.net/book/mh/confmhn.html>.
 
+7) make check
+
+   This takes a bit of time, around one minute on a modern machine,
+   but is highly recommended.  If you're going to run it, it must be
+   run after installation.  If you want to run the nmh test suite
+   prior to installation, use "make distcheck".
+
 8) Add an optional global mh.profile, if desired.  This profile should be
    placed in the nmh `etc' directory with the name `mh.profile'.  This
    file will be used to construct the initial .mh_profile of a new nmh

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=265bf7d31f31962e9b72227d253d278c4da6cd58


commit 265bf7d31f31962e9b72227d253d278c4da6cd58
Author: David Levine <address@hidden>
Date:   Sat Feb 18 17:31:37 2012 -0600

    gcc was warning about unused arguments to main, so added use of them in a 
usage check.

diff --git a/test/getfullname.c b/test/getfullname.c
index 3afa00f..f0c8a2d 100644
--- a/test/getfullname.c
+++ b/test/getfullname.c
@@ -16,6 +16,10 @@
 int
 main(int argc, char *argv[])
 {
+       if (argc > 1) {
+               fprintf (stderr, "usage: %s\n", argv[0]);
+       }
+
        struct passwd *pwd;
 
        pwd = getpwuid(getuid());

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=4d6cfbb1c9b425cb693e5189a19e132c67f5494a


commit 4d6cfbb1c9b425cb693e5189a19e132c67f5494a
Author: David Levine <address@hidden>
Date:   Sat Feb 18 17:30:47 2012 -0600

    Consolidated runtest and check_string test functions.

diff --git a/test/common.sh.in b/test/common.sh.in
index 2308d70..fb24d74 100644
--- a/test/common.sh.in
+++ b/test/common.sh.in
@@ -93,18 +93,19 @@ check() {
     fi
 }
 
-#### check_string() requires two arguments, the first is a program and
-#### arguments, the second is its expected one-line output string.  If
-#### the actual output does not match that string, an error message is
-#### printed and global variable "failed" is incremented.
-check_string() {
+#### run_test() requires two arguments, the first is a program and
+#### arguments, the second is its expected one-line output string.
+#### If the actual output does not match that string:
+#### an error message is printed and global variable "failed" is incremented;
+#### if there is an optional third argument, it is used in the error message.
+run_test() {
   #### Invert exit status to prevent triggering immediate exit due to set -e.
-  ! actual_output=`$1 2>&1`
-  if test "$actual_output" != "$2"; then
-    echo "$0: \"$1\" should have produced:" 1>&2
-    echo "    $2" 1>&2
-    echo "but instead produced:" 1>&2
-    echo "    $actual_output" 1>&2
+  ! actual_output="`$1 2>&1`"
+  if test x"$actual_output" != x"$2"; then
+    echo "$0: ${3:-\"$1\"} expected:" 1>&2
+    echo "    '$2'" 1>&2
+    echo "but instead got:" 1>&2
+    echo "    '$actual_output'" 1>&2
     failed=`expr ${failed:-0} + 1`
   fi
 }
diff --git a/test/format/test-myname b/test/format/test-myname
index 2cc3ce0..dc86ea5 100755
--- a/test/format/test-myname
+++ b/test/format/test-myname
@@ -15,24 +15,17 @@ setup_test
 
 unset SIGNATURE 
 
-runtest()
-{
-       testoutput=$(${MH_LIB_DIR}/ap -format "%(myname)" ignore)
-
-       if [ x"$1" != x"${testoutput}" ]; then
-               echo "For $2, expected $1 but got ${testoutput}"
-               exit 1
-       fi
-}
-
-runtest "$(${MH_OBJ_DIR}/test/getfullname)" "GECOS field test"
+run_test "${MH_LIB_DIR}/ap -format %(myname) ignore" \
+         "`${MH_OBJ_DIR}/test/getfullname`" "GECOS field test"
 
 echo "Signature: Some Random Name 1" >> ${MH}
 
-runtest "Some Random Name 1" "MH Profile Signature test"
+run_test "${MH_LIB_DIR}/ap -format %(myname) ignore" \
+         "Some Random Name 1" "MH Profile Signature test"
 
 export SIGNATURE="Some Random Name 2"
 
-runtest "${SIGNATURE}" "SIGNATURE Environment test"
+run_test "${MH_LIB_DIR}/ap -format %(myname) ignore" \
+         "${SIGNATURE}" "SIGNATURE Environment test"
 
-exit 0
+exit $failed
diff --git a/test/mhpath/test-mhpath b/test/mhpath/test-mhpath
index 2f88eb0..71ee9ea 100755
--- a/test/mhpath/test-mhpath
+++ b/test/mhpath/test-mhpath
@@ -39,14 +39,14 @@ if ! mhpath -v | grep '^mhpath --' > /dev/null; then
 fi
 
 # check +
-check_string "mhpath +" "$MH_TEST_DIR/Mail"
+run_test "mhpath +" "$MH_TEST_DIR/Mail"
 
 # check with no options
 folder -fast +inbox > /dev/null
-check_string "mhpath" "$MH_TEST_DIR/Mail/inbox"
+run_test "mhpath" "$MH_TEST_DIR/Mail/inbox"
 
 # check +inbox
-check_string "mhpath +inbox" "$MH_TEST_DIR/Mail/inbox"
+run_test "mhpath +inbox" "$MH_TEST_DIR/Mail/inbox"
 
 # check all
 cat > $expected <<EOF
@@ -65,8 +65,8 @@ mhpath all > $actual 2>&1
 check $expected $actual
 
 # check message number greater than highest
-check_string "mhpath 11" "mhpath: message 11 out of range 1-10"
-check_string "mhpath 10 11" "mhpath: message 11 out of range 1-10"
+run_test "mhpath 11" "mhpath: message 11 out of range 1-10"
+run_test "mhpath 10 11" "mhpath: message 11 out of range 1-10"
 
 # check range with message number greater than highest
 cat > $expected <<EOF
@@ -85,7 +85,7 @@ mhpath 1-99999 > $actual 2>&1
 check $expected $actual
 
 # check new
-check_string "mhpath new" "$MH_TEST_DIR/Mail/inbox/11"
+run_test "mhpath new" "$MH_TEST_DIR/Mail/inbox/11"
 
 # check multiple msgs, including new
 cat > $expected <<EOF
@@ -97,27 +97,27 @@ mhpath first last new > $actual 2>&1
 check $expected $actual
 
 # check invalid message list using names
-check_string "mhpath last-new" "mhpath: bad message list last-new"
+run_test "mhpath last-new" "mhpath: bad message list last-new"
 
 # check cur
 folder +inbox 5 > /dev/null
-check_string "mhpath cur" "$MH_TEST_DIR/Mail/inbox/5"
+run_test "mhpath cur" "$MH_TEST_DIR/Mail/inbox/5"
 
 # check prev
-check_string "mhpath prev" "$MH_TEST_DIR/Mail/inbox/4"
+run_test "mhpath prev" "$MH_TEST_DIR/Mail/inbox/4"
 
 # check next
-check_string "mhpath next" "$MH_TEST_DIR/Mail/inbox/6"
+run_test "mhpath next" "$MH_TEST_DIR/Mail/inbox/6"
 
 # check invalid message list using numbers
 rmm 1-2
-check_string "mhpath 1-2" "mhpath: no messages in range 1-2"
+run_test "mhpath 1-2" "mhpath: no messages in range 1-2"
 
 # check ignoring of out-of-range message numbers in ranges
-check_string "mhpath 1-3" "$MH_TEST_DIR/Mail/inbox/3"
-check_string "mhpath first-3" "$MH_TEST_DIR/Mail/inbox/3"
-check_string "mhpath 10-11" "$MH_TEST_DIR/Mail/inbox/10"
-check_string "mhpath last-11" "$MH_TEST_DIR/Mail/inbox/10"
+run_test "mhpath 1-3" "$MH_TEST_DIR/Mail/inbox/3"
+run_test "mhpath first-3" "$MH_TEST_DIR/Mail/inbox/3"
+run_test "mhpath 10-11" "$MH_TEST_DIR/Mail/inbox/10"
+run_test "mhpath last-11" "$MH_TEST_DIR/Mail/inbox/10"
 
 # check reference to existing messages
 cat > $expected <<EOF

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

Summary of changes:
 INSTALL                 |   18 ++++++++++--------
 test/common.sh.in       |   23 ++++++++++++-----------
 test/format/test-myname |   21 +++++++--------------
 test/getfullname.c      |    4 ++++
 test/mhpath/test-mhpath |   30 +++++++++++++++---------------
 5 files changed, 48 insertions(+), 48 deletions(-)


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



reply via email to

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