]>
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"
16 user
=${LOGNAME:-`id -un`}
17 host=`${MH_OBJ_DIR}/test/getfqdn`
19 run_test
"${MH_LIB_DIR}/ap -format %(mymbox{text}) ${user}" \
21 run_test
"${MH_LIB_DIR}/ap -format %(mymbox{text}) ${user}@${host}" \
22 1 "Basic user@host test"
23 run_test
"${MH_LIB_DIR}/ap -format %(mymbox{text}) nosuchuser@nosuchhost.blah" \
24 0 "Basic non-matching test"
26 myname
="Random User <random@user.something.com>"
28 echo "Local-Mailbox: ${myname}" >> ${MH}
30 run_test
"echo `${MH_LIB_DIR}/ap -format '%(mymbox{text})' "${myname}"`" \
31 1 "Local-Mailbox test"
33 run_test
"${MH_LIB_DIR}/ap -format %(mymbox{text}) ${user}@${host}" \
34 0 "Local-mailbox overriding user@host test"