X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=test%2Fformat%2Ftest-myname;h=2b48c2f165899d41d531f5c18b6967b237fa7e17;hb=56f140c6607d7a390639bd8535175a841a0fba62;hp=2cc3ce0ed35e8a48ae47e52e784c31d5e1bd314e;hpb=e107aac243dbd4021e57f4c455c7e3ffd82b819e;p=mmh diff --git a/test/format/test-myname b/test/format/test-myname index 2cc3ce0..2b48c2f 100755 --- a/test/format/test-myname +++ b/test/format/test-myname @@ -4,6 +4,8 @@ # the Signature profile entry, and via SIGNATURE environment variable. # +set -e + if test -z "${MH_OBJ_DIR}"; then srcdir=`dirname "$0"`/../.. MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR @@ -13,26 +15,20 @@ fi 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 -} +unset SIGNATURE -runtest "$(${MH_OBJ_DIR}/test/getfullname)" "GECOS field test" +fullname=`${MH_OBJ_DIR}/test/getfullname` +run_test "${MH_LIB_DIR}/ap -format %(myname) ignore" \ + "$fullname" "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