Enclosed program name and directory in double quotes so that they can contain whitespace.
[mmh] / test / format / test-localmbox
1 #!/bin/sh
2 #
3 # Test that we can retrieve the local mailbox name from the profile via
4 # component functions
5 #
6
7 if test -z "${MH_OBJ_DIR}"; then
8     srcdir=`dirname "$0"`/../..
9     MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
10 fi
11
12 . "$MH_OBJ_DIR/test/common.sh"
13
14 setup_test
15
16 testname="Some User <some@domain.com>"
17
18 echo "Local-Mailbox: ${testname}" >> ${MH}
19
20 # We can use "ap" to get the output of format commands
21
22 testoutput=$(${MH_LIB_DIR}/ap -format "%(localmbox)" ignore)
23
24 if [ x"${testname}" != x"${testoutput}" ]; then
25         echo "Expected ${testname}, got ${testoutput}"
26         exit 1
27 fi
28
29 exit 0