]>
diplodocus.org Git - nmh/blob - test/format/test-mymbox
3 # Test that the %(mymbox) function correctly determines whether or not
4 # a particular email address is "mine" or not
7 if test -z "${MH_OBJ_DIR}"; then
8 srcdir
=`dirname "$0"`/..
/..
9 MH_OBJ_DIR
=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
12 .
"$MH_OBJ_DIR/test/common.sh"
18 testoutput
=$
(${MH_LIB_DIR}/ap
-format "%(mymbox{text})" "$1")
20 if [ -z "${testoutput}" ]; then
21 echo "Test program did not return anything for $3"
25 if [ "${testoutput}" -ne $2 ]; then
26 echo "Did not get expected output for $3"
34 runtest
"${user}" 1 "Basic user test"
35 runtest
"${user}@${host}" 1 "Basic user@host test"
36 runtest
"nosuchuser@nosuchhost.blah" 0 "Basic non-matching test"
38 myname
="Random User <random@user.something.com>"
40 echo "Local-Mailbox: ${myname}" >> ${MH}
42 runtest
"${myname}" 1 "Local-Mailbox test"
43 runtest
"${user}@${host}" 0 "Local-mailbox overriding user@host test"