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 911d7035bfc4229bdbb754dbc165982fc4d6c6d2 (commit) from f037e2a3701c6f6c0828b9d441070327446719ac (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=911d7035bfc4229bdbb754dbc165982fc4d6c6d2 commit 911d7035bfc4229bdbb754dbc165982fc4d6c6d2 Author: David Levine <levin...@acm.org> Date: Sun Mar 25 22:42:36 2012 -0500 Added test-install-mh. diff --git a/Makefile.am b/Makefile.am index 057e37a..cf29544 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,7 +50,7 @@ TESTS = test/bad-input/test-header \ test/forw/test-forw-digest \ test/forw/test-forw-format \ test/inc/test-deb359167 test/inc/test-eom-align \ - test/inc/test-inc-scanout \ + test/inc/test-inc-scanout test/install-mh/test-install-mh \ test/manpages/test-manpages test/mhbuild/test-forw \ test/mhlist/test-mhlist test/mhparam/test-mhparam \ test/mhpath/test-mhpath \ @@ -581,7 +581,8 @@ gcov: echo For best results with gcov, configure without --enable-debug; \ fi @echo rebuilding with AM_CFLAGS=--coverage . . . - @(make clean && make AM_CFLAGS=--coverage) > /dev/null && make check + @(make clean && make AM_CFLAGS=--coverage) > /dev/null && \ + make check AM_CFLAGS=--coverage @for i in `find . -name '*.gcda'`; do \ gcov -p -o `echo $$i | $(SED) 's%\\(.*\\)/%\\1 %'`; \ done diff --git a/test/install-mh/test-install-mh b/test/install-mh/test-install-mh new file mode 100755 index 0000000..f8af2c9 --- /dev/null +++ b/test/install-mh/test-install-mh @@ -0,0 +1,71 @@ +#!/bin/sh +###################################################### +# +# Test install-mh +# +###################################################### + +set -e + +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 + +# check with no options, with nmh already installed +run_test "install-mh" \ + 'install-mh: You already have an nmh profile, use an editor to modify it' + +# check -auto, with nmh already installed +run_test "install-mh -auto" 'install-mh: invocation error' + +# check -check, with nmh already installed +run_test "install-mh -check" '' +# make sure exit status is 0 +install-mh -check +run_test "echo $?" '0' + +# Remove the nmh installation so that install-mh can install. +rm -rf $MH_TEST_DIR/Mail + +# check -check, with nmh not installed +run_test "install-mh -check" '' +# make sure exit status is 1 +set +e +install-mh -check +run_test "echo $?" '1' +set -e + +# check with no options, with nmh not installed. Use canned +# responses to install. +installpath=`echo $MH_TEST_DIR/Mail | sed 's%^/%%'` +echo "n +n +n +$installpath +y" | install-mh >/dev/null + +if [ -f $MH_TEST_DIR/Mail/context -a -f $MH_TEST_DIR/Mail/.mh_profile ]; then + install-mh -check +else + failed=`expr ${failed:-0} + 1` +fi + +# Remove the nmh installation so that install-mh -auto can install. +rm -rf $MH_TEST_DIR/Mail +echo "n +n +$installpath" | install-mh -auto >/dev/null + +if [ -f $MH_TEST_DIR/Mail/context -a -f $MH_TEST_DIR/Mail/.mh_profile ]; then + install-mh -check +else + failed=`expr ${failed:-0} + 1` +fi + + +exit $failed ----------------------------------------------------------------------- Summary of changes: Makefile.am | 5 ++- test/install-mh/test-install-mh | 71 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 2 deletions(-) create mode 100755 test/install-mh/test-install-mh hooks/post-receive -- The nmh Mail Handling System _______________________________________________ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits